command
stringlengths 1
42
| description
stringlengths 29
182k
⌀ | name
stringlengths 7
64.9k
⌀ | synopsis
stringlengths 4
85.3k
⌀ | options
stringclasses 593
values | examples
stringclasses 455
values |
|---|---|---|---|---|---|
perldoc
|
perldoc looks up documentation in .pod format that is embedded in the perl installation tree or in a perl script, and displays it using a variety of formatters. This is primarily used for the documentation for the perl library modules. Your system may also have man pages installed for those modules, in which case you can probably just use the man(1) command. If you are looking for a table of contents to the Perl library modules documentation, see the perltoc page.
|
perldoc - Look up Perl documentation in Pod format.
|
perldoc [-h] [-D] [-t] [-u] [-m] [-l] [-U] [-F] [-i] [-V] [-T] [-r] [-d destination_file] [-o formatname] [-M FormatterClassName] [-w formatteroption:value] [-n nroff-replacement] [-X] [-L language_code] PageName|ModuleName|ProgramName|URL Examples: perldoc -f BuiltinFunction perldoc -L it -f BuiltinFunction perldoc -q FAQ Keyword perldoc -L fr -q FAQ Keyword perldoc -v PerlVariable perldoc -a PerlAPI See below for more description of the switches.
|
-h Prints out a brief help message. -D Describes search for the item in detail. -t Display docs using plain text converter, instead of nroff. This may be faster, but it probably won't look as nice. -u Skip the real Pod formatting, and just show the raw Pod source (Unformatted) -m module Display the entire module: both code and unformatted pod documentation. This may be useful if the docs don't explain a function in the detail you need, and you'd like to inspect the code directly; perldoc will find the file for you and simply hand it off for display. -l Display only the file name of the module found. -U When running as the superuser, don't attempt drop privileges for security. This option is implied with -F. NOTE: Please see the heading SECURITY below for more information. -F Consider arguments as file names; no search in directories will be performed. Implies -U if run as the superuser. -f perlfunc The -f option followed by the name of a perl built-in function will extract the documentation of this function from perlfunc. Example: perldoc -f sprintf -q perlfaq-search-regexp The -q option takes a regular expression as an argument. It will search the question headings in perlfaq[1-9] and print the entries matching the regular expression. Example: perldoc -q shuffle -a perlapifunc The -a option followed by the name of a perl api function will extract the documentation of this function from perlapi. Example: perldoc -a newHV -v perlvar The -v option followed by the name of a Perl predefined variable will extract the documentation of this variable from perlvar. Examples: perldoc -v '$"' perldoc -v @+ perldoc -v DATA -T This specifies that the output is not to be sent to a pager, but is to be sent directly to STDOUT. -d destination-filename This specifies that the output is to be sent neither to a pager nor to STDOUT, but is to be saved to the specified filename. Example: "perldoc -oLaTeX -dtextwrapdocs.tex Text::Wrap" -o output-formatname This specifies that you want Perldoc to try using a Pod-formatting class for the output format that you specify. For example: "-oman". This is actually just a wrapper around the "-M" switch; using "-oformatname" just looks for a loadable class by adding that format name (with different capitalizations) to the end of different classname prefixes. For example, "-oLaTeX" currently tries all of the following classes: Pod::Perldoc::ToLaTeX Pod::Perldoc::Tolatex Pod::Perldoc::ToLatex Pod::Perldoc::ToLATEX Pod::Simple::LaTeX Pod::Simple::latex Pod::Simple::Latex Pod::Simple::LATEX Pod::LaTeX Pod::latex Pod::Latex Pod::LATEX. -M module-name This specifies the module that you want to try using for formatting the pod. The class must at least provide a "parse_from_file" method. For example: "perldoc -MPod::Perldoc::ToChecker". You can specify several classes to try by joining them with commas or semicolons, as in "-MTk::SuperPod;Tk::Pod". -w option:value or -w option This specifies an option to call the formatter with. For example, "-w textsize:15" will call "$formatter->textsize(15)" on the formatter object before it is used to format the object. For this to be valid, the formatter class must provide such a method, and the value you pass should be valid. (So if "textsize" expects an integer, and you do "-w textsize:big", expect trouble.) You can use "-w optionname" (without a value) as shorthand for "-w optionname:TRUE". This is presumably useful in cases of on/off features like: "-w page_numbering". You can use an "=" instead of the ":", as in: "-w textsize=15". This might be more (or less) convenient, depending on what shell you use. -X Use an index if it is present. The -X option looks for an entry whose basename matches the name given on the command line in the file "$Config{archlib}/pod.idx". The pod.idx file should contain fully qualified filenames, one per line. -L language_code This allows one to specify the language code for the desired language translation. If the "POD2::<language_code>" package isn't installed in your system, the switch is ignored. All available translation packages are to be found under the "POD2::" namespace. See POD2::IT (or POD2::FR) to see how to create new localized "POD2::*" documentation packages and integrate them into Pod::Perldoc. PageName|ModuleName|ProgramName|URL The item you want to look up. Nested modules (such as "File::Basename") are specified either as "File::Basename" or "File/Basename". You may also give a descriptive name of a page, such as "perlfunc". For URLs, HTTP and HTTPS are the only kind currently supported. For simple names like 'foo', when the normal search fails to find a matching page, a search with the "perl" prefix is tried as well. So "perldoc intro" is enough to find/render "perlintro.pod". -n some-formatter Specify replacement for groff -r Recursive search. -i Ignore case. -V Displays the version of perldoc you're running. SECURITY Because perldoc does not run properly tainted, and is known to have security issues, when run as the superuser it will attempt to drop privileges by setting the effective and real IDs to nobody's or nouser's account, or -2 if unavailable. If it cannot relinquish its privileges, it will not run. See the "-U" option if you do not want this behavior but beware that there are significant security risks if you choose to use "-U". Since 3.26, using "-F" as the superuser also implies "-U" as opening most files and traversing directories requires privileges that are above the nobody/nogroup level. ENVIRONMENT Any switches in the "PERLDOC" environment variable will be used before the command line arguments. Useful values for "PERLDOC" include "-oterm", "-otext", "-ortf", "-oxml", and so on, depending on what modules you have on hand; or the formatter class may be specified exactly with "-MPod::Perldoc::ToTerm" or the like. "perldoc" also searches directories specified by the "PERL5LIB" (or "PERLLIB" if "PERL5LIB" is not defined) and "PATH" environment variables. (The latter is so that embedded pods for executables, such as "perldoc" itself, are available.) In directories where either "Makefile.PL" or "Build.PL" exist, "perldoc" will add "." and "lib" first to its search path, and as long as you're not the superuser will add "blib" too. This is really helpful if you're working inside of a build directory and want to read through the docs even if you have a version of a module previously installed. "perldoc" will use, in order of preference, the pager defined in "PERLDOC_PAGER", "MANPAGER", or "PAGER" before trying to find a pager on its own. ("MANPAGER" is not used if "perldoc" was told to display plain text or unformatted pod.) When using perldoc in it's "-m" mode (display module source code), "perldoc" will attempt to use the pager set in "PERLDOC_SRC_PAGER". A useful setting for this command is your favorite editor as in "/usr/bin/nano". (Don't judge me.) One useful value for "PERLDOC_PAGER" is "less -+C -E". Having PERLDOCDEBUG set to a positive integer will make perldoc emit even more descriptive output than the "-D" switch does; the higher the number, the more it emits. CHANGES Up to 3.14_05, the switch -v was used to produce verbose messages of perldoc operation, which is now enabled by -D. SEE ALSO perlpod, Pod::Perldoc AUTHOR Current maintainer: Mark Allen "<mallen@cpan.org>" Past contributors are: brian d foy "<bdfoy@cpan.org>" Adriano R. Ferreira "<ferreira@cpan.org>", Sean M. Burke "<sburke@cpan.org>", Kenneth Albanowski "<kjahds@kjahds.com>", Andy Dougherty "<doughera@lafcol.lafayette.edu>", and many others. perl v5.38.2 2023-11-28 PERLDOC(1)
| null |
grpc_ruby_plugin
| null | null | null | null | null |
gmd5sum
|
Print or check MD5 (128-bit) checksums. With no FILE, or when FILE is -, read standard input. -b, --binary read in binary mode -c, --check read checksums from the FILEs and check them --tag create a BSD-style checksum -t, --text read in text mode (default) -z, --zero end each output line with NUL, not newline, and disable file name escaping The following five options are useful only when verifying checksums: --ignore-missing don't fail or report status for missing files --quiet don't print OK for each successfully verified file --status don't output anything, status code shows success --strict exit non-zero for improperly formatted checksum lines -w, --warn warn about improperly formatted checksum lines --help display this help and exit --version output version information and exit The sums are computed as described in RFC 1321. When checking, the input should be a former output of this program. The default mode is to print a line with: checksum, a space, a character indicating input mode ('*' for binary, ' ' for text or where binary is insignificant), and name for each FILE. Note: There is no difference between binary mode and text mode on GNU systems. BUGS Do not use the MD5 algorithm for security related purposes. Instead, use an SHA-2 algorithm, implemented in the programs sha224sum(1), sha256sum(1), sha384sum(1), sha512sum(1), or the BLAKE2 algorithm, implemented in b2sum(1) AUTHOR Written by Ulrich Drepper, Scott Miller, and David Madore. REPORTING BUGS GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Report any translation bugs to <https://translationproject.org/team/> COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO cksum(1) Full documentation <https://www.gnu.org/software/coreutils/md5sum> or available locally via: info '(coreutils) md5sum invocation' GNU coreutils 9.3 April 2023 MD5SUM(1)
|
md5sum - compute and check MD5 message digest
|
md5sum [OPTION]... [FILE]...
| null | null |
combine_lang_model
| null | null | null | null | null |
gresource
| null | null | null | null | null |
converttops
| null | null | null | null | null |
flac
|
flac is a command-line tool for encoding, decoding, testing and analyzing FLAC streams. GENERAL USAGE flac supports as input RIFF WAVE, Wave64, RF64, AIFF, FLAC or Ogg FLAC format, or raw interleaved samples. The decoder currently can output to RIFF WAVE, Wave64, RF64, or AIFF format, or raw interleaved samples. flac only supports linear PCM samples (in other words, no A-LAW, uLAW, etc.), and the input must be between 4 and 32 bits per sample. flac assumes that files ending in “.wav” or that have the RIFF WAVE header present are WAVE files, files ending in “.w64” or have the Wave64 header present are Wave64 files, files ending in “.rf64” or have the RF64 header present are RF64 files, files ending in “.aif” or “.aiff” or have the AIFF header present are AIFF files, files ending in “.flac” or have the FLAC header present are FLAC files and files ending in “.oga” or “.ogg” or have the Ogg FLAC header present are Ogg FLAC files. Other than this, flac makes no assumptions about file extensions, though the convention is that FLAC files have the extension “.flac” (or “.fla” on ancient “8.3” file systems like FAT-16). Before going into the full command-line description, a few other things help to sort it out: 1. flac encodes by default, so you must use -d to decode 2. the options -0 .. -8 (or –fast and –best) that control the compression level actually are just synonyms for different groups of specific encoding options (described later) and you can get the same effect by using the same options. When specific options are specified they take priority over the compression level no matter the order 3. flac behaves similarly to gzip in the way it handles input and output files 4. the order in which options are specified is generally not important Skip to the examples below for examples of some common tasks. flac will be invoked one of four ways, depending on whether you are encoding, decoding, testing, or analyzing. Encoding is the default invocation, but can be switch to decoding with -d, analysis with -a or testing with -t. Depending on which way is chosen, encoding, decoding, analysis or testing options can be used, see section OPTIONS for details. General options can be used for all. If only one inputfile is specified, it may be “-” for stdin. When stdin is used as input, flac will write to stdout. Otherwise flac will perform the desired operation on each input file to similarly named output files (meaning for encoding, the extension will be replaced with “.flac”, or appended with “.flac” if the input file has no extension, and for decoding, the extension will be “.wav” for WAVE output and “.raw” for raw output). The original file is not deleted unless –delete-input-file is specified. If you are encoding/decoding from stdin to a file, you should use the -o option like so: flac [options] -o outputfile flac -d [options] -o outputfile which are better than: flac [options] > outputfile flac -d [options] > outputfile since the former allows flac to seek backwards to write the STREAMINFO or RIFF WAVE header contents when necessary. Also, you can force output data to go to stdout using -c. To encode or decode files that start with a dash, use – to signal the end of options, to keep the filenames themselves from being treated as options: flac -V -- -01-filename.wav The encoding options affect the compression ratio and encoding speed. The format options are used to tell flac the arrangement of samples if the input file (or output file when decoding) is a raw file. If it is a RIFF WAVE, Wave64, RF64, or AIFF file the format options are not needed since they are read from the file’s header. In test mode, flac acts just like in decode mode, except no output file is written. Both decode and test modes detect errors in the stream, but they also detect when the MD5 signature of the decoded audio does not match the stored MD5 signature, even when the bitstream is valid. flac can also re-encode FLAC files. In other words, you can specify a FLAC or Ogg FLAC file as an input to the encoder and it will decoder it and re-encode it according to the options you specify. It will also preserve all the metadata unless you override it with other options (e.g. specifying new tags, seekpoints, cuesheet, padding, etc.). flac has been tuned so that the default settings yield a good speed vs. compression tradeoff for many kinds of input. However, if you are looking to maximize the compression rate or speed, or want to use the full power of FLAC’s metadata system, see the page titled `About the FLAC Format' on the FLAC website.
|
flac - Free Lossless Audio Codec
|
flac [ OPTIONS ] [ infile.wav | infile.rf64 | infile.aiff | infile.raw | infile.flac | infile.oga | infile.ogg | - ... ] flac [ -d | --decode | -t | --test | -a | --analyze ] [ OPTIONS ] [ infile.flac | infile.oga | infile.ogg | - ... ]
|
A summary of options is included below. For a complete description, see the HTML documentation. GENERAL OPTIONS -v, --version Show the flac version number -h, --help Show basic usage and a list of all options -H, --explain Show detailed explanation of usage and all options -d, --decode Decode (the default behavior is to encode) -t, --test Test a flac encoded file (same as -d except no decoded file is written) -a, --analyze Analyze a FLAC encoded file (same as -d except an analysis file is written) -c, --stdout Write output to stdout -s, --silent Silent mode (do not write runtime encode/decode statistics to stderr) --totally-silent Do not print anything of any kind, including warnings or errors. The exit code will be the only way to determine successful completion. --no-utf8-convert Do not convert tags from local charset to UTF-8. This is useful for scripts, and setting tags in situations where the locale is wrong. This option must appear before any tag options! -w, --warnings-as-errors Treat all warnings as errors (which cause flac to terminate with a non-zero exit code). -f, --force Force overwriting of output files. By default, flac warns that the output file already exists and continues to the next file. -o filename, --output-name=filename Force the output file name (usually flac just changes the extension). May only be used when encoding a single file. May not be used in conjunction with --output-prefix. --output-prefix=string Prefix each output file name with the given string. This can be useful for encoding or decoding files to a different directory. Make sure if your string is a path name that it ends with a trailing `/’ (slash). --delete-input-file Automatically delete the input file after a successful encode or decode. If there was an error (including a verify error) the input file is left intact. --preserve-modtime Output files have their timestamps/permissions set to match those of their inputs (this is default). Use --no-preserve- modtime to make output files have the current time and default permissions. --keep-foreign-metadata If encoding, save WAVE, RF64, or AIFF non-audio chunks in FLAC metadata. If decoding, restore any saved non-audio chunks from FLAC metadata when writing the decoded file. Foreign metadata cannot be transcoded, e.g. WAVE chunks saved in a FLAC file cannot be restored when decoding to AIFF. Input and output must be regular files (not stdin or stdout). With this option, FLAC will pick the right output format on decoding. --keep-foreign-metadata-if-present Like --keep-foreign-metadata, but without throwing an error if foreign metadata cannot be found or restored, instead printing a warning. --skip={#|mm:ss.ss} Skip over the first number of samples of the input. This works for both encoding and decoding, but not testing. The alternative form mm:ss.ss can be used to specify minutes, seconds, and fractions of a second. --until={#|[+|-]mm:ss.ss} Stop at the given sample number for each input file. This works for both encoding and decoding, but not testing. The given sample number is not included in the decoded output. The alternative form mm:ss.ss can be used to specify minutes, seconds, and fractions of a second. If a `+’ (plus) sign is at the beginning, the --until point is relative to the --skip point. If a `-’ (minus) sign is at the beginning, the --until point is relative to end of the audio. --ogg When encoding, generate Ogg FLAC output instead of native FLAC. Ogg FLAC streams are FLAC streams wrapped in an Ogg transport layer. The resulting file should have an `.oga' extension and will still be decodable by flac. When decoding, force the input to be treated as Ogg FLAC. This is useful when piping input from stdin or when the filename does not end in `.oga' or `.ogg'. --serial-number=# When used with --ogg, specifies the serial number to use for the first Ogg FLAC stream, which is then incremented for each additional stream. When encoding and no serial number is given, flac uses a random number for the first stream, then increments it for each additional stream. When decoding and no number is given, flac uses the serial number of the first page. ANALYSIS OPTIONS --residual-text Includes the residual signal in the analysis file. This will make the file very big, much larger than even the decoded file. --residual-gnuplot Generates a gnuplot file for every subframe; each file will contain the residual distribution of the subframe. This will create a lot of files. DECODING OPTIONS --cue=[#.#][-[#.#]] Set the beginning and ending cuepoints to decode. The optional first #.# is the track and index point at which decoding will start; the default is the beginning of the stream. The optional second #.# is the track and index point at which decoding will end; the default is the end of the stream. If the cuepoint does not exist, the closest one before it (for the start point) or after it (for the end point) will be used. If those don’t exist, the start of the stream (for the start point) or end of the stream (for the end point) will be used. The cuepoints are merely translated into sample numbers then used as --skip and --until. A CD track can always be cued by, for example, --cue=9.1-10.1 for track 9, even if the CD has no 10th track. -F, --decode-through-errors By default flac stops decoding with an error and removes the partially decoded file if it encounters a bitstream error. With -F, errors are still printed but flac will continue decoding to completion. Note that errors may cause the decoded audio to be missing some samples or have silent sections. --apply-replaygain-which-is-not-lossless[=<specification>] Applies ReplayGain values while decoding. WARNING: THIS IS NOT LOSSLESS. DECODED AUDIO WILL NOT BE IDENTICAL TO THE ORIGINAL WITH THIS OPTION. This option is useful for example in transcoding media servers, where the client does not support ReplayGain. For details on the use of this option, see the section ReplayGain application specification. ENCODING OPTIONS -V, --verify Verify a correct encoding by decoding the output in parallel and comparing to the original --lax Allow encoder to generate non-Subset files. The resulting FLAC file may not be streamable or might have trouble being played in all players (especially hardware devices), so you should only use this option in combination with custom encoding options meant for archival. --replay-gain Calculate ReplayGain values and store them as FLAC tags, similar to vorbisgain. Title gains/peaks will be computed for each input file, and an album gain/peak will be computed for all files. All input files must have the same resolution, sample rate, and number of channels. Only mono and stereo files are allowed, and the sample rate must be 8, 11.025, 12, 16, 18.9, 22.05, 24, 28, 32, 36, 37.8, 44.1, 48, 56, 64, 72, 75.6, 88.2, 96, 112, 128, 144, 151.2, 176.4, 192, 224, 256, 288, 302.4, 352.8, 384, 448, 512, 576, or 604.8 kHz. Also note that this option may leave a few extra bytes in a PADDING block as the exact size of the tags is not known until all files are processed. Note that this option cannot be used when encoding to standard output (stdout). --cuesheet=filename Import the given cuesheet file and store it in a CUESHEET metadata block. This option may only be used when encoding a single file. A seekpoint will be added for each index point in the cuesheet to the SEEKTABLE unless --no-cued-seekpoints is specified. --picture={FILENAME|SPECIFICATION} Import a picture and store it in a PICTURE metadata block. More than one --picture option can be specified. Either a filename for the picture file or a more complete specification form can be used. The SPECIFICATION is a string whose parts are separated by | (pipe) characters. Some parts may be left empty to invoke default values. FILENAME is just shorthand for “||||FILENAME”. For the format of SPECIFICATION, see the section picture specification. --ignore-chunk-sizes When encoding to flac, ignore the file size headers in WAV and AIFF files to attempt to work around problems with over-sized or malformed files. WAV and AIFF files both have an unsigned 32 bit numbers in the file header which specifes the length of audio data. Since this number is unsigned 32 bits, that limits the size of a valid file to being just over 4 Gigabytes. Files larger than this are mal-formed, but should be read correctly using this option. -S {#|X|#x|#s}, --seekpoint={#|X|#x|#s} Include a point or points in a SEEKTABLE. Using #, a seek point at that sample number is added. Using X, a placeholder point is added at the end of a the table. Using #x, # evenly spaced seek points will be added, the first being at sample 0. Using #s, a seekpoint will be added every # seconds (# does not have to be a whole number; it can be, for example, 9.5, meaning a seekpoint every 9.5 seconds). You may use many -S options; the resulting SEEKTABLE will be the unique-ified union of all such values. With no -S options, flac defaults to `-S 10s'. Use --no- seektable for no SEEKTABLE. Note: `-S #x' and `-S #s' will not work if the encoder can’t determine the input size before starting. Note: if you use `-S #' and # is >= samples in the input, there will be either no seek point entered (if the input size is determinable before encoding starts) or a placeholder point (if input size is not determinable). -P #, --padding=# Tell the encoder to write a PADDING metadata block of the given length (in bytes) after the STREAMINFO block. This is useful if you plan to tag the file later with an APPLICATION block; instead of having to rewrite the entire file later just to insert your block, you can write directly over the PADDING block. Note that the total length of the PADDING block will be 4 bytes longer than the length given because of the 4 metadata block header bytes. You can force no PADDING block at all to be written with --no-padding. The encoder writes a PADDING block of 8192 bytes by default (or 65536 bytes if the input audio stream is more that 20 minutes long). -T FIELD=VALUE, --tag=FIELD=VALUE Add a FLAC tag. The comment must adhere to the Vorbis comment spec; i.e. the FIELD must contain only legal characters, terminated by an `equals' sign. Make sure to quote the comment if necessary. This option may appear more than once to add several comments. NOTE: all tags will be added to all encoded files. --tag-from-file=FIELD=FILENAME Like --tag, except FILENAME is a file whose contents will be read verbatim to set the tag value. The contents will be converted to UTF-8 from the local charset. This can be used to store a cuesheet in a tag (e.g. --tag-from- file=“CUESHEET=image.cue”). Do not try to store binary data in tag fields! Use APPLICATION blocks for that. -b #, --blocksize=# Specify the blocksize in samples. The default is 1152 for -l 0, else 4096. For subset streams this must be <= 4608 if the samplerate <= 48kHz, for subset streams with higher samplerates it must be <= 16384. -m, --mid-side Try mid-side coding for each frame (stereo input only) -M, --adaptive-mid-side Adaptive mid-side coding for all frames (stereo input only) -0..-8, --compression-level-0..--compression-level-8 Fastest compression..highest compression (default is -5). These are synonyms for other options: -0, --compression-level-0 Synonymous with -l 0 -b 1152 -r 3 --no-mid-side -1, --compression-level-1 Synonymous with -l 0 -b 1152 -M -r 3 -2, --compression-level-2 Synonymous with -l 0 -b 1152 -m -r 3 -3, --compression-level-3 Synonymous with -l 6 -b 4096 -r 4 --no-mid-side -4, --compression-level-4 Synonymous with -l 8 -b 4096 -M -r 4 -5, --compression-level-5 Synonymous with -l 8 -b 4096 -m -r 5 -6, --compression-level-6 Synonymous with -l 8 -b 4096 -m -r 6 -A subdivide_tukey(2) -7, --compression-level-7 Synonymous with -l 12 -b 4096 -m -r 6 -A subdivide_tukey(2) -8, --compression-level-8 Synonymous with -l 12 -b 4096 -m -r 6 -A subdivide_tukey(3) --fast Fastest compression. Currently synonymous with -0. --best Highest compression. Currently synonymous with -8. -e, --exhaustive-model-search Do exhaustive model search (expensive!) -A function, --apodization=function Window audio data with given the apodization function. See section Apodization functions for details. -l #, --max-lpc-order=# Specifies the maximum LPC order. This number must be <= 32. For subset streams, it must be <=12 if the sample rate is <=48kHz. If 0, the encoder will not attempt generic linear prediction, and use only fixed predictors. Using fixed predictors is faster but usually results in files being 5-10% larger. -p, --qlp-coeff-precision-search Do exhaustive search of LP coefficient quantization (expensive!). Overrides -q; does nothing if using -l 0 -q #, --qlp-coeff-precision=# Precision of the quantized linear-predictor coefficients, 0 => let encoder decide (min is 5, default is 0) -r [#,]#, --rice-partition-order=[#,]# Set the [min,]max residual partition order (0..15). min defaults to 0 if unspecified. Default is -r 5. FORMAT OPTIONS --endian={big|little} Set the byte order for samples --channels=# Set number of channels. --bps=# Set bits per sample. --sample-rate=# Set sample rate (in Hz). --sign={signed|unsigned} Set the sign of samples. --input-size=# Specify the size of the raw input in bytes. If you are encoding raw samples from stdin, you must set this option in order to be able to use --skip, --until, --cuesheet, or other options that need to know the size of the input beforehand. If the size given is greater than what is found in the input stream, the encoder will complain about an unexpected end-of-file. If the size given is less, samples will be truncated. --force-raw-format Force input (when encoding) or output (when decoding) to be treated as raw samples (even if filename ends in .wav). --force-aiff-format --force-rf64-format --force-wave64-format : Force the decoder to output AIFF/RF64/WAVE64 format respectively. This option is not needed if the output filename (as set by -o) ends with .aif or .aiff, .rf64 and .w64 respectively. Also, this option has no effect when encoding since input is auto- detected. When none of these options nor –keep-foreign-metadata are given and no output filename is set, the output format is WAV by default. --force-legacy-wave-format --force-extensible-wave-format : Instruct the decoder to output a WAVE file with WAVE_FORMAT_PCM and WAVE_FORMAT_EXTENSIBLE respectively. If none of these options nor –keep-foreign-metadata are given, FLAC outputs WAVE_FORMAT_PCM for mono or stereo with a bit depth of 8 or 16 bits, and WAVE_FORMAT_EXTENSIBLE for all other audio formats. --force-aiff-c-none-format --force-aiff-c-sowt-format : Instruct the decoder to output an AIFF-C file with format NONE and sowt respectively. NEGATIVE OPTIONS --no-adaptive-mid-side --no-cued-seekpoints --no-decode-through-errors --no-delete-input-file --no-preserve-modtime --no-keep-foreign-metadata --no-exhaustive-model-search --no-force --no-lax --no-mid-side --no-ogg --no-padding --no-qlp-coeff-prec-search --no-replay-gain --no-residual-gnuplot --no-residual-text --no-seektable --no-silent --no-verify --no-warnings-as-errors These flags can be used to invert the sense of the corresponding normal option. ReplayGain application specification The option --apply-replaygain-which-is-not-lossless[=<specification>] applies ReplayGain values while decoding. WARNING: THIS IS NOT LOSSLESS. DECODED AUDIO WILL NOT BE IDENTICAL TO THE ORIGINAL WITH THIS OPTION.** This option is useful for example in transcoding media servers, where the client does not support ReplayGain. The equals sign and <specification> is optional. If omitted, the default specification is 0aLn1. The <specification> is a shorthand notation for describing how to apply ReplayGain. All components are optional but order is important. `[]' means `optional'. `|' means `or'. `{}' means required. The format is: [<preamp>][a|t][l|L][n{0|1|2|3}] In which the following parameters are used: • preamp: A floating point number in dB. This is added to the existing gain value. • a|t: Specify `a' to use the album gain, or `t' to use the track gain. If tags for the preferred kind (album/track) do not exist but tags for the other (track/album) do, those will be used instead. • l|L: Specify `l' to peak-limit the output, so that the ReplayGain peak value is full-scale. Specify `L' to use a 6dB hard limiter that kicks in when the signal approaches full-scale. • n{0|1|2|3}: Specify the amount of noise shaping. ReplayGain synthesis happens in floating point; the result is dithered before converting back to integer. This quantization adds noise. Noise shaping tries to move the noise where you won’t hear it as much. 0 means no noise shaping, 1 means `low', 2 means `medium', 3 means `high'. For example, the default of 0aLn1 means 0dB preamp, use album gain, 6dB hard limit, low noise shaping. --apply-replaygain-which-is-not- lossless=3 means 3dB preamp, use album gain, no limiting, no noise shaping. flac uses the ReplayGain tags for the calculation. If a stream does not have the required tags or they can’t be parsed, decoding will continue with a warning, and no ReplayGain is applied to that stream. Picture specification This described the specification used for the --picture option. [TYPE]|[MIME-TYPE]|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE TYPE is optional; it is a number from one of: 0. Other 1. 32x32 pixels `file icon' (PNG only) 2. Other file icon 3. Cover (front) 4. Cover (back) 5. Leaflet page 6. Media (e.g. label side of CD) 7. Lead artist/lead performer/soloist 8. Artist/performer 9. Conductor 10. Band/Orchestra 11. Composer 12. Lyricist/text writer 13. Recording Location 14. During recording 15. During performance 16. Movie/video screen capture 17. A bright coloured fish 18. Illustration 19. Band/artist logotype 20. Publisher/Studio logotype The default is 3 (front cover). There may only be one picture each of type 1 and 2 in a file. MIME-TYPE is optional; if left blank, it will be detected from the file. For best compatibility with players, use pictures with MIME type image/jpeg or image/png. The MIME type can also be --> to mean that FILE is actually a URL to an image, though this use is discouraged. DESCRIPTION is optional; the default is an empty string. The next part specifies the resolution and color information. If the MIME-TYPE is image/jpeg, image/png, or image/gif, you can usually leave this empty and they can be detected from the file. Otherwise, you must specify the width in pixels, height in pixels, and color depth in bits- per-pixel. If the image has indexed colors you should also specify the number of colors used. When manually specified, it is not checked against the file for accuracy. FILE is the path to the picture file to be imported, or the URL if MIME type is --> For example, “|image/jpeg|||../cover.jpg” will embed the JPEG file at ../cover.jpg, defaulting to type 3 (front cover) and an empty description. The resolution and color info will be retrieved from the file itself. The specification “4|-->|CD|320x300x24/173|http://blah.blah/backcover.tiff” will embed the given URL, with type 4 (back cover), description “CD”, and a manually specified resolution of 320x300, 24 bits-per-pixel, and 173 colors. The file at the URL will not be fetched; the URL itself is stored in the PICTURE metadata block. Apodization functions To improve LPC analysis, audio data is windowed . The window can be selected with one or more -A options. Possible functions are: bartlett, bartlett_hann, blackman, blackman_harris_4term_92db, connes, flattop, gauss(STDDEV), hamming, hann, kaiser_bessel, nuttall, rectangle, triangle, tukey(P), partial_tukey(n[/ov[/P]]), punchout_tukey(n[/ov[/P]]), subdivide_tukey(n[/P]) welch. • For gauss(STDDEV), STDDEV is the standard deviation (0<STDDEV<=0.5). • For tukey(P), P specifies the fraction of the window that is tapered (0<=P<=1; P=0 corresponds to “rectangle” and P=1 corresponds to “hann”). • For partial_tukey(n) and punchout_tukey(n), n apodization functions are added that span different parts of each block. Values of 2 to 6 seem to yield sane results. If necessary, an overlap can be specified, as can be the taper parameter, for example partial_tukey(2/0.2) or partial_tukey(2/0.2/0.5). ov should be smaller than 1 and can be negative. The use of this is that different parts of a block are ignored as the might contain transients which are hard to predict anyway. The encoder will try each different added apodization (each covering a different part of the block) to see which resulting predictor results in the smallest representation. • subdivide_tukey(n) is a more efficient reimplementation of partial_tukey and punchout_tukey taken together, recycling as much data as possible. It combines all possible non-redundant partial_tukey(n) and punchout_tukey(n) up to the n specified. Specifying subdivide_tukey(3) is equivalent to specifying tukey, partial_tukey(2), partial_tukey(3) and punchout_tukey(3), specifying subdivide_tukey(5) equivalently adds partial_tukey(4), punchout_tukey(4), partial_tukey(5) and punchout_tukey(5). To be able to reuse data as much as possible, the tukey taper is taken equal for all windows, and the P specified is applied for the smallest used window. In other words, subdivide_tukey(2/0.5) results in a taper equal to that of tukey(0.25) and subdivide_tukey(5) in a taper equal to that of tukey(0.1). The default P for subdivide_tukey when none is specified is 0.5. Note that P, STDDEV and ov are locale specific, so a comma as decimal separator might be required instead of a dot. Use scientific notation for a locale-independent specification, for example tukey(5e-1) instead of tukey(0.5) or tukey(0,5). More than one -A option (up to 32) may be used. Any function that is specified erroneously is silently dropped. The encoder chooses suitable defaults in the absence of any -A options; any -A option specified replaces the default(s). When more than one function is specified, then for every subframe the encoder will try each of them separately and choose the window that results in the smallest compressed subframe. Multiple functions can greatly increase the encoding time. SEE ALSO metaflac(1) AUTHOR This manual page was initially written by Matt Zimmerman <mdz@debian.org> for the Debian GNU/Linux system (but may be used by others). It has been kept up-to-date by the Xiph.org Foundation. Version 1.4.3 flac(1)
|
Some common encoding tasks using flac: flac abc.wav Encode abc.wav to abc.flac using the default compression setting. abc.wav is not deleted. flac --delete-input-file abc.wav Like above, except abc.wav is deleted if there were no errors. flac --delete-input-file -w abc.wav Like above, except abc.wav is deleted if there were no errors or warnings. flac --best abc.wav Encode abc.wav to abc.flac using the highest compression setting. flac --verify abc.wav Encode abc.wav to abc.flac and internally decode abc.flac to make sure it matches abc.wav. flac -o my.flac abc.wav Encode abc.wav to my.flac. flac -T "TITLE=Bohemian Rhapsody" -T "ARTIST=Queen" abc.wav Encode abc.wav and add some tags at the same time to abc.flac. flac *.wav Encode all .wav files in the current directory. flac abc.aiff Encode abc.aiff to abc.flac. flac abc.rf64 Encode abc.rf64 to abc.flac. flac abc.w64 Encode abc.w64 to abc.flac. flac abc.flac --force This one’s a little tricky: notice that flac is in encode mode by default (you have to specify -d to decode) so this command actually recompresses abc.flac back to abc.flac. –force is needed to make sure you really want to overwrite abc.flac with a new version. Why would you want to do this? It allows you to recompress an existing FLAC file with (usually) higher compression options or a newer version of FLAC and preserve all the metadata like tags too. Some common decoding tasks using flac: flac -d abc.flac Decode abc.flac to abc.wav. abc.flac is not deleted. NOTE: Without -d it means re-encode abc.flac to abc.flac (see above). flac -d --force-aiff-format abc.flac flac -d -o abc.aiff abc.flac : Two different ways of decoding abc.flac to abc.aiff (AIFF format). abc.flac is not deleted. flac -d --force-rf64-format abc.flac flac -d -o abc.rf64 abc.flac : Two different ways of decoding abc.flac to abc.rf64 (RF64 format). abc.flac is not deleted. flac -d --force-wave64-format abc.flac flac -d -o abc.w64 abc.flac : Two different ways of decoding abc.flac to abc.w64 (Wave64 format). abc.flac is not deleted. flac -d -F abc.flac Decode abc.flac to abc.wav and don’t abort if errors are found (useful for recovering as much as possible from corrupted files).
|
jsonschema
| null | null | null | null | null |
avifenc
| null | null | null | null | null |
sourcery
| null | null | null | null | null |
key_app
| null | null | null | null | null |
pdfimages
|
Pdfimages saves images from a Portable Document Format (PDF) file as Portable Pixmap (PPM), Portable Bitmap (PBM), Portable Network Graphics (PNG), Tagged Image File Format (TIFF), JPEG, JPEG2000, or JBIG2 files. Pdfimages reads the PDF file PDF-file, scans one or more pages, and writes one file for each image, image-root-nnn.xxx, where nnn is the image number and xxx is the image type (.ppm, .pbm, .png, .tif, .jpg, jp2, jb2e, or jb2g). If PDF-file is ´-', it reads the PDF file from stdin. The default output format is PBM (for monochrome images) or PPM for non-monochrome. The -png or -tiff options change to default output to PNG or TIFF respectively. If both -png and -tiff are specified, CMYK images will be written as TIFF and all other images will be written as PNG. In addition the -j, -jp2, and -jbig2 options will cause JPEG, JPEG2000, and JBIG2, respectively, images in the PDF file to be written in their native format.
|
pdfimages - Portable Document Format (PDF) image extractor (version 3.03)
|
pdfimages [options] PDF-file image-root
|
-f number Specifies the first page to scan. -l number Specifies the last page to scan. -png Change the default output format to PNG. -tiff Change the default output format to TIFF. -j Write images in JPEG format as JPEG files instead of the default format. The JPEG file is identical to the JPEG data stored in the PDF. -jp2 Write images in JPEG2000 format as JP2 files instead of the default format. The JP2 file is identical to the JPEG2000 data stored in the PDF. -jbig2 Write images in JBIG2 format as JBIG2 files instead of the default format. JBIG2 data in PDF is of the embedded type. The embedded type of JBIG2 has an optional separate file containing global data. The embedded data is written with the extension .jb2e and the global data (if available) will be written to the same image number with the extension .jb2g. The content of both these files is identical to the JBIG2 data in the PDF. -ccitt Write images in CCITT format as CCITT files instead of the default format. The CCITT file is identical to the CCITT data stored in the PDF. PDF files contain additional parameters specifying how to decode the CCITT data. These parameters are translated to fax2tiff input options and written to a .params file with the same image number. The parameters are: -1 1D Group 3 encoding -2 2D Group 3 encoding -4 Group 4 encoding -A Beginning of line is aligned on a byte boundary -P Beginning of line is not aligned on a byte boundary -X n The image width in pixels -W Encoding uses 1 for black and 0 for white -B Encoding uses 0 for black and 1 for white -M Input data fills from most significant bit to least significant bit. -all Write JPEG, JPEG2000, JBIG2, and CCITT images in their native format. CMYK files are written as TIFF files. All other images are written as PNG files. This is equivalent to specifying the options -png -tiff -j -jp2 -jbig2 -ccitt. -list Instead of writing the images, list the images along with various information for each image. Do not specify an image-root with this option. The following information is listed for each image: page the page number containing the image num the image number type the image type: image - an opaque image mask - a monochrome mask image smask - a soft-mask image stencil - a monochrome mask image used for painting a color or pattern Note: Tranparency in images is represented in PDF using a separate image for the image and the mask/smask. The mask/smask used as part of a transparent image always immediately follows the image in the image list. width image width (in pixels) height image height (in pixels) Note: the image width/height is the size of the embedded image, not the size the image will be rendered at. color image color space: gray - Gray rgb - RGB cmyk - CMYK lab - L*a*b icc - ICC Based index - Indexed Color sep - Separation devn - DeviceN comp number of color components bpc bits per component enc encoding: image - raster image (may be Flate or LZW compressed but does not use an image encoding) jpeg - Joint Photographic Experts Group jp2 - JPEG2000 jbig2 - Joint Bi-Level Image Experts Group ccitt - CCITT Group 3 or Group 4 Fax interp "yes" if the interpolation is to be performed when scaling up the image object ID the image dictionary object ID (number and generation) x-ppi The horizontal resolution of the image (in pixels per inch) when rendered on the pdf page. y-ppi The vertical resolution of the image (in pixels per inch) when rendered on the pdf page. size The size of the embedded image in the pdf file. The following suffixes are used: 'B' bytes, 'K' kilobytes, 'M' megabytes, and 'G' gigabytes. ratio The compression ratio of the embedded image. -opw password Specify the owner password for the PDF file. Providing this will bypass all security restrictions. -upw password Specify the user password for the PDF file. -p Include page numbers in output file names. -print-filenames Print image filenames to stdout. -q Don't print any messages or errors. -v Print copyright and version information. -h Print usage information. (-help and --help are equivalent.) EXIT CODES The Xpdf tools use the following exit codes: 0 No error. 1 Error opening a PDF file. 2 Error opening an output file. 3 Error related to PDF permissions. 99 Other error. AUTHOR The pdfimages software and documentation are copyright 1998-2011 Glyph & Cog, LLC. SEE ALSO pdfdetach(1), pdffonts(1), pdfinfo(1), pdftocairo(1), pdftohtml(1), pdftoppm(1), pdftops(1), pdftotext(1) pdfseparate(1), pdfsig(1), pdfunite(1) 15 August 2011 pdfimages(1)
| null |
display_to_hlg
| null | null | null | null | null |
aarch64-apple-darwin23-gcc-nm-13
| null | null | null | null | null |
ristsender
| null | null | null | null | null |
gunexpand
|
Convert blanks in each FILE to tabs, writing to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -a, --all convert all blanks, instead of just initial blanks --first-only convert only leading sequences of blanks (overrides -a) -t, --tabs=N have tabs N characters apart instead of 8 (enables -a) -t, --tabs=LIST use comma separated list of tab positions. The last specified position can be prefixed with '/' to specify a tab size to use after the last explicitly specified tab stop. Also a prefix of '+' can be used to align remaining tab stops relative to the last specified tab stop instead of the first column --help display this help and exit --version output version information and exit AUTHOR Written by David MacKenzie. REPORTING BUGS GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Report any translation bugs to <https://translationproject.org/team/> COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO expand(1) Full documentation <https://www.gnu.org/software/coreutils/unexpand> or available locally via: info '(coreutils) unexpand invocation' GNU coreutils 9.3 April 2023 UNEXPAND(1)
|
unexpand - convert spaces to tabs
|
unexpand [OPTION]... [FILE]...
| null | null |
gsort
|
Write sorted concatenation of all FILE(s) to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. Ordering options: -b, --ignore-leading-blanks ignore leading blanks -d, --dictionary-order consider only blanks and alphanumeric characters -f, --ignore-case fold lower case to upper case characters -g, --general-numeric-sort compare according to general numerical value -i, --ignore-nonprinting consider only printable characters -M, --month-sort compare (unknown) < 'JAN' < ... < 'DEC' -h, --human-numeric-sort compare human readable numbers (e.g., 2K 1G) -n, --numeric-sort compare according to string numerical value -R, --random-sort shuffle, but group identical keys. See shuf(1) --random-source=FILE get random bytes from FILE -r, --reverse reverse the result of comparisons --sort=WORD sort according to WORD: general-numeric -g, human-numeric -h, month -M, numeric -n, random -R, version -V -V, --version-sort natural sort of (version) numbers within text Other options: --batch-size=NMERGE merge at most NMERGE inputs at once; for more use temp files -c, --check, --check=diagnose-first check for sorted input; do not sort -C, --check=quiet, --check=silent like -c, but do not report first bad line --compress-program=PROG compress temporaries with PROG; decompress them with PROG -d --debug annotate the part of the line used to sort, and warn about questionable usage to stderr --files0-from=F read input from the files specified by NUL-terminated names in file F; If F is - then read names from standard input -k, --key=KEYDEF sort via a key; KEYDEF gives location and type -m, --merge merge already sorted files; do not sort -o, --output=FILE write result to FILE instead of standard output -s, --stable stabilize sort by disabling last-resort comparison -S, --buffer-size=SIZE use SIZE for main memory buffer -t, --field-separator=SEP use SEP instead of non-blank to blank transition -T, --temporary-directory=DIR use DIR for temporaries, not $TMPDIR or /tmp; multiple options specify multiple directories --parallel=N change the number of sorts run concurrently to N -u, --unique with -c, check for strict ordering; without -c, output only the first of an equal run -z, --zero-terminated line delimiter is NUL, not newline --help display this help and exit --version output version information and exit KEYDEF is F[.C][OPTS][,F[.C][OPTS]] for start and stop position, where F is a field number and C a character position in the field; both are origin 1, and the stop position defaults to the line's end. If neither -t nor -b is in effect, characters in a field are counted from the beginning of the preceding whitespace. OPTS is one or more single-letter ordering options [bdfgiMhnRrV], which override global ordering options for that key. If no key is given, use the entire line as the key. Use --debug to diagnose incorrect key usage. SIZE may be followed by the following multiplicative suffixes: % 1% of memory, b 1, K 1024 (default), and so on for M, G, T, P, E, Z, Y, R, Q. *** WARNING *** The locale specified by the environment affects sort order. Set LC_ALL=C to get the traditional sort order that uses native byte values. AUTHOR Written by Mike Haertel and Paul Eggert. REPORTING BUGS GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Report any translation bugs to <https://translationproject.org/team/> COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO shuf(1), uniq(1) Full documentation <https://www.gnu.org/software/coreutils/sort> or available locally via: info '(coreutils) sort invocation' GNU coreutils 9.3 April 2023 SORT(1)
|
sort - sort lines of text files
|
sort [OPTION]... [FILE]... sort [OPTION]... --files0-from=F
| null | null |
tor
|
Tor is a connection-oriented anonymizing communication service. Users choose a source-routed path through a set of nodes, and negotiate a "virtual circuit" through the network. Each node in a virtual circuit knows its predecessor and successor nodes, but no other nodes. Traffic flowing down the circuit is unwrapped by a symmetric key at each node, which reveals the downstream node. Basically, Tor provides a distributed network of servers or relays ("onion routers"). Users bounce their TCP streams, including web traffic, ftp, ssh, etc., around the network, so that recipients, observers, and even the relays themselves have difficulty tracking the source of the stream. Note By default, tor acts as a client only. To help the network by providing bandwidth as a relay, change the ORPort configuration option as mentioned below. Please also consult the documentation on the Tor Project’s website. COMMAND-LINE OPTIONS Tor has a powerful command-line interface. This section lists optional arguments you can specify at the command line using the tor command. Configuration options can be specified on the command line in the format --OptionName OptionValue, on the command line in the format OptionName OptionValue, or in a configuration file. For instance, you can tell Tor to start listening for SOCKS connections on port 9999 by passing either --SocksPort 9999 or SocksPort 9999 on the command line, or by specifying SocksPort 9999 in the configuration file. On the command line, quote option values that contain spaces. For instance, if you want Tor to log all debugging messages to debug.log, you must specify --Log "debug file debug.log". Note Configuration options on the command line override those in configuration files. See THE CONFIGURATION FILE FORMAT for more information. The following options in this section are only recognized on the tor command line, not in a configuration file. -h, --help Display a short help message and exit. -f, --torrc-file FILE Specify a new configuration file to contain further Tor configuration options, or pass - to make Tor read its configuration from standard input. (Default: /opt/homebrew/etc/tor/torrc, or $HOME/.torrc if that file is not found.) --allow-missing-torrc Allow the configuration file specified by -f to be missing, if the defaults-torrc file (see below) is accessible. --defaults-torrc FILE Specify a file in which to find default values for Tor options. The contents of this file are overridden by those in the regular configuration file, and by those on the command line. (Default: /opt/homebrew/etc/tor/torrc-defaults.) --ignore-missing-torrc Specify that Tor should treat a missing torrc file as though it were empty. Ordinarily, Tor does this for missing default torrc files, but not for those specified on the command line. --hash-password PASSWORD Generate a hashed password for control port access. --list-fingerprint [key type] Generate your keys and output your nickname and fingerprint. Optionally, you can specify the key type as rsa (default) or ed25519. --verify-config Verify whether the configuration file is valid. --dump-config short|full Write a list of Tor’s configured options to standard output. When the short flag is selected, only write the options that are different from their default values. When full is selected, write every option. --service install [--options command-line options] Install an instance of Tor as a Windows service, with the provided command-line options. Current instructions can be found at https://www.torproject.org/docs/faq#NTService --service remove|start|stop Remove, start, or stop a configured Tor Windows service. --nt-service Used internally to implement a Windows service. --list-torrc-options List all valid options. --list-deprecated-options List all valid options that are scheduled to become obsolete in a future version. (This is a warning, not a promise.) --list-modules List whether each optional module has been compiled into Tor. (Any module not listed is not optional in this version of Tor.) --version Display Tor version and exit. The output is a single line of the format "Tor version [version number]." (The version number format is as specified in version-spec.txt.) --quiet|--hush Override the default console logging behavior. By default, Tor starts out logging messages at level "notice" and higher to the console. It stops doing so after it parses its configuration, if the configuration tells it to log anywhere else. These options override the default console logging behavior. Use the --hush option if you want Tor to log only warnings and errors to the console, or use the --quiet option if you want Tor not to log to the console at all. --keygen [--newpass] Running tor --keygen creates a new ed25519 master identity key for a relay, or only a fresh temporary signing key and certificate, if you already have a master key. Optionally, you can encrypt the master identity key with a passphrase. When Tor asks you for a passphrase and you don’t want to encrypt the master key, just don’t enter any passphrase when asked. Use the --newpass option with --keygen only when you need to add, change, or remove a passphrase on an existing ed25519 master identity key. You will be prompted for the old passphrase (if any), and the new passphrase (if any). Note When generating a master key, you may want to use --DataDirectory to control where the keys and certificates will be stored, and --SigningKeyLifetime to control their lifetimes. See SERVER OPTIONS to learn more about the behavior of these options. You must have write access to the specified DataDirectory. To use the generated files, you must copy them to the DataDirectory/keys directory of your Tor daemon, and make sure that they are owned by the user actually running the Tor daemon on your system. --passphrase-fd FILEDES File descriptor to read the passphrase from. Note that unlike with the tor-gencert program, the entire file contents are read and used as the passphrase, including any trailing newlines. If the file descriptor is not specified, the passphrase is read from the terminal by default. --key-expiration [purpose] [--format iso8601|timestamp] The purpose specifies which type of key certificate to determine the expiration of. The only currently recognised purpose is "sign". Running tor --key-expiration sign will attempt to find your signing key certificate and will output, both in the logs as well as to stdout. The optional --format argument lets you specify the time format. Currently, iso8601 and timestamp are supported. If --format is not specified, the signing key certificate’s expiration time will be in ISO-8601 format. For example, the output sent to stdout will be of the form: "signing-cert-expiry: 2017-07-25 08:30:15 UTC". If --format timestamp is specified, the signing key certificate’s expiration time will be in Unix timestamp format. For example, the output sent to stdout will be of the form: "signing-cert-expiry: 1500971415". --dbg-... Tor may support other options beginning with the string "dbg". These are intended for use by developers to debug and test Tor. They are not supported or guaranteed to be stable, and you should probably not use them. THE CONFIGURATION FILE FORMAT All configuration options in a configuration are written on a single line by default. They take the form of an option name and a value, or an option name and a quoted value (option value or option "value"). Anything after a # character is treated as a comment. Options are case-insensitive. C-style escaped characters are allowed inside quoted values. To split one configuration entry into multiple lines, use a single backslash character (\) before the end of the line. Comments can be used in such multiline entries, but they must start at the beginning of a line. Configuration options can be imported from files or folders using the %include option with the value being a path. This path can have wildcards. Wildcards are expanded first, then sorted using lexical order. Then, for each matching file or folder, the following rules are followed: if the path is a file, the options from the file will be parsed as if they were written where the %include option is. If the path is a folder, all files on that folder will be parsed following lexical order. Files starting with a dot are ignored. Files in subfolders are ignored. The %include option can be used recursively. New configuration files or directories cannot be added to already running Tor instance if Sandbox is enabled. The supported wildcards are * meaning any number of characters including none and ? meaning exactly one character. These characters can be escaped by preceding them with a backslash, except on Windows. Files starting with a dot are not matched when expanding wildcards unless the starting dot is explicitly in the pattern, except on Windows. By default, an option on the command line overrides an option found in the configuration file, and an option in a configuration file overrides one in the defaults file. This rule is simple for options that take a single value, but it can become complicated for options that are allowed to occur more than once: if you specify four SocksPorts in your configuration file, and one more SocksPort on the command line, the option on the command line will replace all of the SocksPorts in the configuration file. If this isn’t what you want, prefix the option name with a plus sign (+), and it will be appended to the previous set of options instead. For example, setting SocksPort 9100 will use only port 9100, but setting +SocksPort 9100 will use ports 9100 and 9050 (because this is the default). Alternatively, you might want to remove every instance of an option in the configuration file, and not replace it at all: you might want to say on the command line that you want no SocksPorts at all. To do that, prefix the option name with a forward slash (/). You can use the plus sign (+) and the forward slash (/) in the configuration file and on the command line. GENERAL OPTIONS AccelDir DIR Specify this option if using dynamic hardware acceleration and the engine implementation library resides somewhere other than the OpenSSL default. Can not be changed while tor is running. AccelName NAME When using OpenSSL hardware crypto acceleration attempt to load the dynamic engine of this name. This must be used for any dynamic hardware engine. Names can be verified with the openssl engine command. Can not be changed while tor is running. If the engine name is prefixed with a "!", then Tor will exit if the engine cannot be loaded. AlternateBridgeAuthority [nickname] [flags] ipv4address:port fingerprint, AlternateDirAuthority [nickname] [flags] ipv4address:port fingerprint These options behave as DirAuthority, but they replace fewer of the default directory authorities. Using AlternateDirAuthority replaces the default Tor directory authorities, but leaves the default bridge authorities in place. Similarly, AlternateBridgeAuthority replaces the default bridge authority, but leaves the directory authorities alone. AvoidDiskWrites 0|1 If non-zero, try to write to disk less frequently than we would otherwise. This is useful when running on flash memory or other media that support only a limited number of writes. (Default: 0) BandwidthBurst N bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits Limit the maximum token bucket size (also known as the burst) to the given number of bytes in each direction. (Default: 1 GByte) BandwidthRate N bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits A token bucket limits the average incoming bandwidth usage on this node to the specified number of bytes per second, and the average outgoing bandwidth usage to that same value. If you want to run a relay in the public network, this needs to be at the very least 75 KBytes for a relay (that is, 600 kbits) or 50 KBytes for a bridge (400 kbits) — but of course, more is better; we recommend at least 250 KBytes (2 mbits) if possible. (Default: 1 GByte) Note that this option, and other bandwidth-limiting options, apply to TCP data only: They do not count TCP headers or DNS traffic. Tor uses powers of two, not powers of ten, so 1 GByte is 1024*1024*1024 bytes as opposed to 1 billion bytes. With this option, and in other options that take arguments in bytes, KBytes, and so on, other formats are also supported. Notably, "KBytes" can also be written as "kilobytes" or "kb"; "MBytes" can be written as "megabytes" or "MB"; "kbits" can be written as "kilobits"; and so forth. Case doesn’t matter. Tor also accepts "byte" and "bit" in the singular. The prefixes "tera" and "T" are also recognized. If no units are given, we default to bytes. To avoid confusion, we recommend writing "bytes" or "bits" explicitly, since it’s easy to forget that "B" means bytes, not bits. CacheDirectory DIR Store cached directory data in DIR. Can not be changed while tor is running. (Default: uses the value of DataDirectory.) CacheDirectoryGroupReadable 0|1|auto If this option is set to 0, don’t allow the filesystem group to read the CacheDirectory. If the option is set to 1, make the CacheDirectory readable by the default GID. If the option is "auto", then we use the setting for DataDirectoryGroupReadable when the CacheDirectory is the same as the DataDirectory, and 0 otherwise. (Default: auto) CircuitPriorityHalflife NUM If this value is set, we override the default algorithm for choosing which circuit’s cell to deliver or relay next. It is delivered first to the circuit that has the lowest weighted cell count, where cells are weighted exponentially according to this value (in seconds). If the value is -1, it is taken from the consensus if possible else it will fallback to the default value of 30. Minimum: 1, Maximum: 2147483647. This can be defined as a float value. This is an advanced option; you generally shouldn’t have to mess with it. (Default: -1) ClientTransportPlugin transport socks4|socks5 IP:PORT, ClientTransportPlugin transport exec path-to-binary [options] In its first form, when set along with a corresponding Bridge line, the Tor client forwards its traffic to a SOCKS-speaking proxy on "IP:PORT". (IPv4 addresses should written as-is; IPv6 addresses should be wrapped in square brackets.) It’s the duty of that proxy to properly forward the traffic to the bridge. In its second form, when set along with a corresponding Bridge line, the Tor client launches the pluggable transport proxy executable in path-to-binary using options as its command-line options, and forwards its traffic to it. It’s the duty of that proxy to properly forward the traffic to the bridge. (Default: none) ConfluxEnabled 0|1|auto If this option is set to 1, general purpose traffic will use Conflux which is traffic splitting among multiple legs (circuits). Onion services are not supported at the moment. Default value is set to "auto" meaning the consensus is used to decide unless set. (Default: auto) ConfluxClientUX throughput|latency|throughput_lowmem|latency_lowmem This option configures the user experience that the client requests from the exit, for data that the exit sends to the client. The default is "throughput", which maximizes throughput. "Latency" will tell the exit to only use the circuit with lower latency for all data. The lowmem versions minimize queue usage memory at the client. (Default: "throughput") ConnLimit NUM The minimum number of file descriptors that must be available to the Tor process before it will start. Tor will ask the OS for as many file descriptors as the OS will allow (you can find this by "ulimit -H -n"). If this number is less than ConnLimit, then Tor will refuse to start. Tor relays need thousands of sockets, to connect to every other relay. If you are running a private bridge, you can reduce the number of sockets that Tor uses. For example, to limit Tor to 500 sockets, run "ulimit -n 500" in a shell. Then start tor in the same shell, with ConnLimit 500. You may also need to set DisableOOSCheck 0. Unless you have severely limited sockets, you probably don’t need to adjust ConnLimit itself. It has no effect on Windows, since that platform lacks getrlimit(). (Default: 1000) ConstrainedSockets 0|1 If set, Tor will tell the kernel to attempt to shrink the buffers for all sockets to the size specified in ConstrainedSockSize. This is useful for virtual servers and other environments where system level TCP buffers may be limited. If you’re on a virtual server, and you encounter the "Error creating network socket: No buffer space available" message, you are likely experiencing this problem. The preferred solution is to have the admin increase the buffer pool for the host itself via /proc/sys/net/ipv4/tcp_mem or equivalent facility; this configuration option is a second-resort. The DirPort option should also not be used if TCP buffers are scarce. The cached directory requests consume additional sockets which exacerbates the problem. You should not enable this feature unless you encounter the "no buffer space available" issue. Reducing the TCP buffers affects window size for the TCP stream and will reduce throughput in proportion to round trip time on long paths. (Default: 0) ConstrainedSockSize N bytes|KBytes When ConstrainedSockets is enabled the receive and transmit buffers for all sockets will be set to this limit. Must be a value between 2048 and 262144, in 1024 byte increments. Default of 8192 is recommended. ControlPort [address:]port|unix:path|auto [flags] If set, Tor will accept connections on this port and allow those connections to control the Tor process using the Tor Control Protocol (described in control-spec.txt in torspec). Note: unless you also specify one or more of HashedControlPassword or CookieAuthentication, setting this option will cause Tor to allow any process on the local host to control it. (Setting both authentication methods means either method is sufficient to authenticate to Tor.) This option is required for many Tor controllers; most use the value of 9051. If a unix domain socket is used, you may quote the path using standard C escape sequences. You can specify this directive multiple times, to bind to multiple address/port pairs. Set it to "auto" to have Tor pick a port for you. (Default: 0) Recognized flags are: GroupWritable Unix domain sockets only: makes the socket get created as group-writable. WorldWritable Unix domain sockets only: makes the socket get created as world-writable. RelaxDirModeCheck Unix domain sockets only: Do not insist that the directory that holds the socket be read-restricted. ControlPortFileGroupReadable 0|1 If this option is set to 0, don’t allow the filesystem group to read the control port file. If the option is set to 1, make the control port file readable by the default GID. (Default: 0) ControlPortWriteToFile Path If set, Tor writes the address and port of any control port it opens to this address. Usable by controllers to learn the actual control port when ControlPort is set to "auto". ControlSocket Path Like ControlPort, but listens on a Unix domain socket, rather than a TCP socket. 0 disables ControlSocket. (Unix and Unix-like systems only.) (Default: 0) ControlSocketsGroupWritable 0|1 If this option is set to 0, don’t allow the filesystem group to read and write unix sockets (e.g. ControlSocket). If the option is set to 1, make the control socket readable and writable by the default GID. (Default: 0) CookieAuthentication 0|1 If this option is set to 1, allow connections on the control port when the connecting process knows the contents of a file named "control_auth_cookie", which Tor will create in its data directory. This authentication method should only be used on systems with good filesystem security. (Default: 0) CookieAuthFile Path If set, this option overrides the default location and file name for Tor’s cookie file. (See CookieAuthentication.) CookieAuthFileGroupReadable 0|1 If this option is set to 0, don’t allow the filesystem group to read the cookie file. If the option is set to 1, make the cookie file readable by the default GID. [Making the file readable by other groups is not yet implemented; let us know if you need this for some reason.] (Default: 0) CountPrivateBandwidth 0|1 If this option is set, then Tor’s rate-limiting applies not only to remote connections, but also to connections to private addresses like 127.0.0.1 or 10.0.0.1. This is mostly useful for debugging rate-limiting. (Default: 0) DataDirectory DIR Store working data in DIR. Can not be changed while tor is running. (Default: ~/.tor if your home directory is not /; otherwise, /opt/homebrew/var/lib/tor. On Windows, the default is your ApplicationData folder.) DataDirectoryGroupReadable 0|1 If this option is set to 0, don’t allow the filesystem group to read the DataDirectory. If the option is set to 1, make the DataDirectory readable by the default GID. (Default: 0) DirAuthority [nickname] [flags] ipv4address:dirport fingerprint Use a nonstandard authoritative directory server at the provided address and port, with the specified key fingerprint. This option can be repeated many times, for multiple authoritative directory servers. Flags are separated by spaces, and determine what kind of an authority this directory is. By default, an authority is not authoritative for any directory style or version unless an appropriate flag is given. Tor will use this authority as a bridge authoritative directory if the "bridge" flag is set. If a flag "orport=orport" is given, Tor will use the given port when opening encrypted tunnels to the dirserver. If a flag "weight=num" is given, then the directory server is chosen randomly with probability proportional to that weight (default 1.0). If a flag "v3ident=fp" is given, the dirserver is a v3 directory authority whose v3 long-term signing key has the fingerprint fp. Lastly, if an "ipv6=[ipv6address]:orport" flag is present, then the directory authority is listening for IPv6 connections on the indicated IPv6 address and OR Port. Tor will contact the authority at ipv4address to download directory documents. Clients always use the ORPort. Relays usually use the DirPort, but will use the ORPort in some circumstances. If an IPv6 ORPort is supplied, clients will also download directory documents at the IPv6 ORPort, if they are configured to use IPv6. If no DirAuthority line is given, Tor will use the default directory authorities. NOTE: this option is intended for setting up a private Tor network with its own directory authorities. If you use it, you will be distinguishable from other users, because you won’t believe the same authorities they do. DirAuthorityFallbackRate NUM When configured to use both directory authorities and fallback directories, the directory authorities also work as fallbacks. They are chosen with their regular weights, multiplied by this number, which should be 1.0 or less. The default is less than 1, to reduce load on authorities. (Default: 0.1) DisableAllSwap 0|1 If set to 1, Tor will attempt to lock all current and future memory pages, so that memory cannot be paged out. Windows, OS X and Solaris are currently not supported. We believe that this feature works on modern Gnu/Linux distributions, and that it should work on *BSD systems (untested). This option requires that you start your Tor as root, and you should use the User option to properly reduce Tor’s privileges. Can not be changed while tor is running. (Default: 0) DisableDebuggerAttachment 0|1 If set to 1, Tor will attempt to prevent basic debugging attachment attempts by other processes. This may also keep Tor from generating core files if it crashes. It has no impact for users who wish to attach if they have CAP_SYS_PTRACE or if they are root. We believe that this feature works on modern Gnu/Linux distributions, and that it may also work on *BSD systems (untested). Some modern Gnu/Linux systems such as Ubuntu have the kernel.yama.ptrace_scope sysctl and by default enable it as an attempt to limit the PTRACE scope for all user processes by default. This feature will attempt to limit the PTRACE scope for Tor specifically - it will not attempt to alter the system wide ptrace scope as it may not even exist. If you wish to attach to Tor with a debugger such as gdb or strace you will want to set this to 0 for the duration of your debugging. Normal users should leave it on. Disabling this option while Tor is running is prohibited. (Default: 1) DisableNetwork 0|1 When this option is set, we don’t listen for or accept any connections other than controller connections, and we close (and don’t reattempt) any outbound connections. Controllers sometimes use this option to avoid using the network until Tor is fully configured. Tor will make still certain network-related calls (like DNS lookups) as a part of its configuration process, even if DisableNetwork is set. (Default: 0) ExtendByEd25519ID 0|1|auto If this option is set to 1, we always try to include a relay’s Ed25519 ID when telling the preceding relay in a circuit to extend to it. If this option is set to 0, we never include Ed25519 IDs when extending circuits. If the option is set to "auto", we obey a parameter in the consensus document. (Default: auto) ExtORPort [address:]port|auto Open this port to listen for Extended ORPort connections from your pluggable transports. (Default: DataDirectory/extended_orport_auth_cookie) ExtORPortCookieAuthFile Path If set, this option overrides the default location and file name for the Extended ORPort’s cookie file — the cookie file is needed for pluggable transports to communicate through the Extended ORPort. ExtORPortCookieAuthFileGroupReadable 0|1 If this option is set to 0, don’t allow the filesystem group to read the Extended OR Port cookie file. If the option is set to 1, make the cookie file readable by the default GID. [Making the file readable by other groups is not yet implemented; let us know if you need this for some reason.] (Default: 0) FallbackDir ipv4address:dirport orport=orport id=fingerprint [weight=num] [ipv6=[ipv6address]:orport] When tor is unable to connect to any directory cache for directory info (usually because it doesn’t know about any yet) it tries a hard-coded directory. Relays try one directory authority at a time. Clients try multiple directory authorities and FallbackDirs, to avoid hangs on startup if a hard-coded directory is down. Clients wait for a few seconds between each attempt, and retry FallbackDirs more often than directory authorities, to reduce the load on the directory authorities. FallbackDirs should be stable relays with stable IP addresses, ports, and identity keys. They must have a DirPort. By default, the directory authorities are also FallbackDirs. Specifying a FallbackDir replaces Tor’s default hard-coded FallbackDirs (if any). (See DirAuthority for an explanation of each flag.) FetchDirInfoEarly 0|1 If set to 1, Tor will always fetch directory information like other directory caches, even if you don’t meet the normal criteria for fetching early. Normal users should leave it off. (Default: 0) FetchDirInfoExtraEarly 0|1 If set to 1, Tor will fetch directory information before other directory caches. It will attempt to download directory information closer to the start of the consensus period. Normal users should leave it off. (Default: 0) FetchHidServDescriptors 0|1 If set to 0, Tor will never fetch any hidden service descriptors from the rendezvous directories. This option is only useful if you’re using a Tor controller that handles hidden service fetches for you. (Default: 1) FetchServerDescriptors 0|1 If set to 0, Tor will never fetch any network status summaries or server descriptors from the directory servers. This option is only useful if you’re using a Tor controller that handles directory fetches for you. (Default: 1) FetchUselessDescriptors 0|1 If set to 1, Tor will fetch every consensus flavor, and all server descriptors and authority certificates referenced by those consensuses, except for extra info descriptors. When this option is 1, Tor will also keep fetching descriptors, even when idle. If set to 0, Tor will avoid fetching useless descriptors: flavors that it is not using to build circuits, and authority certificates it does not trust. When Tor hasn’t built any application circuits, it will go idle, and stop fetching descriptors. This option is useful if you’re using a tor client with an external parser that uses a full consensus. This option fetches all documents except extrainfo descriptors, DirCache fetches and serves all documents except extrainfo descriptors, DownloadExtraInfo* fetches extrainfo documents, and serves them if DirCache is on, and UseMicrodescriptors changes the flavor of consensuses and descriptors that is fetched and used for building circuits. (Default: 0) HardwareAccel 0|1 If non-zero, try to use built-in (static) crypto hardware acceleration when available. Can not be changed while tor is running. (Default: 0) HashedControlPassword hashed_password Allow connections on the control port if they present the password whose one-way hash is hashed_password. You can compute the hash of a password by running "tor --hash-password password". You can provide several acceptable passwords by using more than one HashedControlPassword line. HTTPProxy host[:port] Tor will make all its directory requests through this host:port (or host:80 if port is not specified), rather than connecting directly to any directory servers. (DEPRECATED: As of 0.3.1.0-alpha you should use HTTPSProxy.) HTTPProxyAuthenticator username:password If defined, Tor will use this username:password for Basic HTTP proxy authentication, as in RFC 2617. This is currently the only form of HTTP proxy authentication that Tor supports; feel free to submit a patch if you want it to support others. (DEPRECATED: As of 0.3.1.0-alpha you should use HTTPSProxyAuthenticator.) HTTPSProxy host[:port] Tor will make all its OR (SSL) connections through this host:port (or host:443 if port is not specified), via HTTP CONNECT rather than connecting directly to servers. You may want to set FascistFirewall to restrict the set of ports you might try to connect to, if your HTTPS proxy only allows connecting to certain ports. HTTPSProxyAuthenticator username:password If defined, Tor will use this username:password for Basic HTTPS proxy authentication, as in RFC 2617. This is currently the only form of HTTPS proxy authentication that Tor supports; feel free to submit a patch if you want it to support others. KeepalivePeriod NUM To keep firewalls from expiring connections, send a padding keepalive cell every NUM seconds on open connections that are in use. (Default: 5 minutes) KeepBindCapabilities 0|1|auto On Linux, when we are started as root and we switch our identity using the User option, the KeepBindCapabilities option tells us whether to try to retain our ability to bind to low ports. If this value is 1, we try to keep the capability; if it is 0 we do not; and if it is auto, we keep the capability only if we are configured to listen on a low port. Can not be changed while tor is running. (Default: auto.) Log minSeverity[-maxSeverity] stderr|stdout|syslog Send all messages between minSeverity and maxSeverity to the standard output stream, the standard error stream, or to the system log. (The "syslog" value is only supported on Unix.) Recognized severity levels are debug, info, notice, warn, and err. We advise using "notice" in most cases, since anything more verbose may provide sensitive information to an attacker who obtains the logs. If only one severity level is given, all messages of that level or higher will be sent to the listed destination. Some low-level logs may be sent from signal handlers, so their destination logs must be signal-safe. These low-level logs include backtraces, logging function errors, and errors in code called by logging functions. Signal-safe logs are always sent to stderr or stdout. They are also sent to a limited number of log files that are configured to log messages at error severity from the bug or general domains. They are never sent as syslogs, control port log events, or to any API-based log destinations. Log minSeverity[-maxSeverity] file FILENAME As above, but send log messages to the listed filename. The "Log" option may appear more than once in a configuration file. Messages are sent to all the logs that match their severity level. Log [domain,...]minSeverity[-maxSeverity] ... file FILENAME Log [domain,...]minSeverity[-maxSeverity] ... stderr|stdout|syslog As above, but select messages by range of log severity and by a set of "logging domains". Each logging domain corresponds to an area of functionality inside Tor. You can specify any number of severity ranges for a single log statement, each of them prefixed by a comma-separated list of logging domains. You can prefix a domain with ~ to indicate negation, and use * to indicate "all domains". If you specify a severity range without a list of domains, it matches all domains. This is an advanced feature which is most useful for debugging one or two of Tor’s subsystems at a time. The currently recognized domains are: general, crypto, net, config, fs, protocol, mm, http, app, control, circ, rend, bug, dir, dirserv, or, edge, acct, hist, handshake, heartbeat, channel, sched, guard, consdiff, dos, process, pt, btrack, and mesg. Domain names are case-insensitive. For example, "Log [handshake]debug [~net,~mm]info notice stdout" sends to stdout: all handshake messages of any severity, all info-and-higher messages from domains other than networking and memory management, and all messages of severity notice or higher. LogMessageDomains 0|1 If 1, Tor includes message domains with each log message. Every log message currently has at least one domain; most currently have exactly one. This doesn’t affect controller log messages. (Default: 0) LogTimeGranularity NUM Set the resolution of timestamps in Tor’s logs to NUM milliseconds. NUM must be positive and either a divisor or a multiple of 1 second. Note that this option only controls the granularity written by Tor to a file or console log. Tor does not (for example) "batch up" log messages to affect times logged by a controller, times attached to syslog messages, or the mtime fields on log files. (Default: 1 second) MaxAdvertisedBandwidth N bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits If set, we will not advertise more than this amount of bandwidth for our BandwidthRate. Server operators who want to reduce the number of clients who ask to build circuits through them (since this is proportional to advertised bandwidth rate) can thus reduce the CPU demands on their server without impacting network performance. MaxUnparseableDescSizeToLog N bytes|KBytes|MBytes|GBytes|TBytes Unparseable descriptors (e.g. for votes, consensuses, routers) are logged in separate files by hash, up to the specified size in total. Note that only files logged during the lifetime of this Tor process count toward the total; this is intended to be used to debug problems without opening live servers to resource exhaustion attacks. (Default: 10 MBytes) MetricsPort [address:]port [format] WARNING: Before enabling this, it is important to understand that exposing tor metrics publicly is dangerous to the Tor network users. Please take extra precaution and care when opening this port. Set a very strict access policy with MetricsPortPolicy and consider using your operating systems firewall features for defense in depth. We recommend, for the prometheus format, that the only address that can access this port should be the Prometheus server itself. Remember that the connection is unencrypted (HTTP) hence consider using a tool like stunnel to secure the link from this port to the server. If set, open this port to listen for an HTTP GET request to "/metrics". Upon a request, the collected metrics in the the tor instance are formatted for the given format and then sent back. If this is set, MetricsPortPolicy must be defined else every request will be rejected. Supported format is "prometheus" which is also the default if not set. The Prometheus data model can be found here: https://prometheus.io/docs/concepts/data_model/ The tor metrics are constantly collected and they solely consists of counters. Thus, asking for those metrics is very lightweight on the tor process. (Default: None) As an example, here only 5.6.7.8 will be allowed to connect: MetricsPort 1.2.3.4:9035 MetricsPortPolicy accept 5.6.7.8 MetricsPortPolicy policy,policy,... Set an entrance policy for the MetricsPort, to limit who can access it. The policies have the same form as exit policies below, except that port specifiers are ignored. For multiple entries, this line can be used multiple times. It is a reject all by default policy. (Default: None) Please, keep in mind here that if the server collecting metrics on the MetricsPort is behind a NAT, then everything behind it can access it. This is similar for the case of allowing localhost, every users on the server will be able to access it. Again, strongly consider using a tool like stunnel to secure the link or to strengthen access control. NoExec 0|1 If this option is set to 1, then Tor will never launch another executable, regardless of the settings of ClientTransportPlugin or ServerTransportPlugin. Once this option has been set to 1, it cannot be set back to 0 without restarting Tor. (Default: 0) OutboundBindAddress IP Make all outbound connections originate from the IP address specified. This is only useful when you have multiple network interfaces, and you want all of Tor’s outgoing connections to use a single one. This option may be used twice, once with an IPv4 address and once with an IPv6 address. IPv6 addresses should be wrapped in square brackets. This setting will be ignored for connections to the loopback addresses (127.0.0.0/8 and ::1), and is not used for DNS requests as well. OutboundBindAddressExit IP Make all outbound exit connections originate from the IP address specified. This option overrides OutboundBindAddress for the same IP version. This option may be used twice, once with an IPv4 address and once with an IPv6 address. IPv6 addresses should be wrapped in square brackets. This setting will be ignored for connections to the loopback addresses (127.0.0.0/8 and ::1). OutboundBindAddressOR IP Make all outbound non-exit (relay and other) connections originate from the IP address specified. This option overrides OutboundBindAddress for the same IP version. This option may be used twice, once with an IPv4 address and once with an IPv6 address. IPv6 addresses should be wrapped in square brackets. This setting will be ignored for connections to the loopback addresses (127.0.0.0/8 and ::1). __OwningControllerProcess PID Make Tor instance periodically check for presence of a controller process with given PID and terminate itself if this process is no longer alive. Polling interval is 15 seconds. PerConnBWBurst N bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits If this option is set manually, or via the "perconnbwburst" consensus field, Tor will use it for separate rate limiting for each connection from a non-relay. (Default: 0) PerConnBWRate N bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits If this option is set manually, or via the "perconnbwrate" consensus field, Tor will use it for separate rate limiting for each connection from a non-relay. (Default: 0) OutboundBindAddressPT IP Request that pluggable transports makes all outbound connections originate from the IP address specified. Because outgoing connections are handled by the pluggable transport itself, it is not possible for Tor to enforce whether the pluggable transport honors this option. This option overrides OutboundBindAddress for the same IP version. This option may be used twice, once with an IPv4 address and once with an IPv6 address. IPv6 addresses should be wrapped in square brackets. This setting will be ignored for connections to the loopback addresses (127.0.0.0/8 and ::1). PidFile FILE On startup, write our PID to FILE. On clean shutdown, remove FILE. Can not be changed while tor is running. ProtocolWarnings 0|1 If 1, Tor will log with severity 'warn' various cases of other parties not following the Tor specification. Otherwise, they are logged with severity 'info'. (Default: 0) RelayBandwidthBurst N bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits If not 0, limit the maximum token bucket size (also known as the burst) for _relayed traffic_ to the given number of bytes in each direction. They do not include directory fetches by the relay (from authority or other relays), because that is considered "client" activity. (Default: 0) RelayBandwidthBurst defaults to the value of RelayBandwidthRate if unset. RelayBandwidthRate N bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits If not 0, a separate token bucket limits the average incoming bandwidth usage for _relayed traffic_ on this node to the specified number of bytes per second, and the average outgoing bandwidth usage to that same value. Relayed traffic currently is calculated to include answers to directory requests, but that may change in future versions. They do not include directory fetches by the relay (from authority or other relays), because that is considered "client" activity. (Default: 0) RelayBandwidthRate defaults to the value of RelayBandwidthBurst if unset. RephistTrackTime N seconds|minutes|hours|days|weeks Tells an authority, or other node tracking node reliability and history, that fine-grained information about nodes can be discarded when it hasn’t changed for a given amount of time. (Default: 24 hours) RunAsDaemon 0|1 If 1, Tor forks and daemonizes to the background. This option has no effect on Windows; instead you should use the --service command-line option. Can not be changed while tor is running. (Default: 0) SafeLogging 0|1|relay Tor can scrub potentially sensitive strings from log messages (e.g. addresses) by replacing them with the string [scrubbed]. This way logs can still be useful, but they don’t leave behind personally identifying information about what sites a user might have visited. If this option is set to 0, Tor will not perform any scrubbing, if it is set to 1, all potentially sensitive strings are replaced. If it is set to relay, all log messages generated when acting as a relay are sanitized, but all messages generated when acting as a client are not. Note: Tor may not heed this option when logging at log levels below Notice. (Default: 1) Sandbox 0|1 If set to 1, Tor will run securely through the use of a syscall sandbox. Otherwise the sandbox will be disabled. The option only works on Linux-based operating systems, and only when Tor has been built with the libseccomp library. Note that this option may be incompatible with some versions of libc, and some kernel versions. This option can not be changed while tor is running. When the Sandbox is 1, the following options can not be changed when tor is running: Address, ConnLimit, CookieAuthFile, DirPortFrontPage, ExtORPortCookieAuthFile, Logs, ServerDNSResolvConfFile, ClientOnionAuthDir (and any files in it won’t reload on HUP signal). Launching new Onion Services through the control port is not supported with current syscall sandboxing implementation. Tor must remain in client or server mode (some changes to ClientOnly and ORPort are not allowed). Currently, if Sandbox is 1, ControlPort command "GETINFO address" will not work. When using %include in the tor configuration files, reloading the tor configuration is not supported after adding new configuration files or directories. (Default: 0) Schedulers KIST|KISTLite|Vanilla Specify the scheduler type that tor should use. The scheduler is responsible for moving data around within a Tor process. This is an ordered list by priority which means that the first value will be tried first and if unavailable, the second one is tried and so on. It is possible to change these values at runtime. This option mostly effects relays, and most operators should leave it set to its default value. (Default: KIST,KISTLite,Vanilla) The possible scheduler types are: KIST: Kernel-Informed Socket Transport. Tor will use TCP information from the kernel to make informed decisions regarding how much data to send and when to send it. KIST also handles traffic in batches (see KISTSchedRunInterval) in order to improve traffic prioritization decisions. As implemented, KIST will only work on Linux kernel version 2.6.39 or higher. KISTLite: Same as KIST but without kernel support. Tor will use all the same mechanics as with KIST, including the batching, but its decisions regarding how much data to send will not be as good. KISTLite will work on all kernels and operating systems, and the majority of the benefits of KIST are still realized with KISTLite. Vanilla: The scheduler that Tor used before KIST was implemented. It sends as much data as possible, as soon as possible. Vanilla will work on all kernels and operating systems. KISTSchedRunInterval NUM msec If KIST or KISTLite is used in the Schedulers option, this controls at which interval the scheduler tick is. If the value is 0 msec, the value is taken from the consensus if possible else it will fallback to the default 10 msec. Maximum possible value is 100 msec. (Default: 0 msec) KISTSockBufSizeFactor NUM If KIST is used in Schedulers, this is a multiplier of the per-socket limit calculation of the KIST algorithm. (Default: 1.0) Socks4Proxy host[:port] Tor will make all OR connections through the SOCKS 4 proxy at host:port (or host:1080 if port is not specified). Socks5Proxy host[:port] Tor will make all OR connections through the SOCKS 5 proxy at host:port (or host:1080 if port is not specified). Socks5ProxyUsername username Socks5ProxyPassword password If defined, authenticate to the SOCKS 5 server using username and password in accordance to RFC 1929. Both username and password must be between 1 and 255 characters. SyslogIdentityTag tag When logging to syslog, adds a tag to the syslog identity such that log entries are marked with "Tor-tag". Can not be changed while tor is running. (Default: none) TCPProxy protocol host:port Tor will use the given protocol to make all its OR (SSL) connections through a TCP proxy on host:port, rather than connecting directly to servers. You may want to set FascistFirewall to restrict the set of ports you might try to connect to, if your proxy only allows connecting to certain ports. There is no equivalent option for directory connections, because all Tor client versions that support this option download directory documents via OR connections. The only protocol supported right now 'haproxy'. This option is only for clients. (Default: none) + The HAProxy version 1 proxy protocol is described in detail at https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt + Both source IP address and source port will be set to zero. TruncateLogFile 0|1 If 1, Tor will overwrite logs at startup and in response to a HUP signal, instead of appending to them. (Default: 0) UnixSocksGroupWritable 0|1 If this option is set to 0, don’t allow the filesystem group to read and write unix sockets (e.g. SocksPort unix:). If the option is set to 1, make the Unix socket readable and writable by the default GID. (Default: 0) UseDefaultFallbackDirs 0|1 Use Tor’s default hard-coded FallbackDirs (if any). (When a FallbackDir line is present, it replaces the hard-coded FallbackDirs, regardless of the value of UseDefaultFallbackDirs.) (Default: 1) User Username On startup, setuid to this user and setgid to their primary group. Can not be changed while tor is running. CLIENT OPTIONS The following options are useful only for clients (that is, if SocksPort, HTTPTunnelPort, TransPort, DNSPort, or NATDPort is non-zero): AllowNonRFC953Hostnames 0|1 When this option is disabled, Tor blocks hostnames containing illegal characters (like @ and :) rather than sending them to an exit node to be resolved. This helps trap accidental attempts to resolve URLs and so on. (Default: 0) AutomapHostsOnResolve 0|1 When this option is enabled, and we get a request to resolve an address that ends with one of the suffixes in AutomapHostsSuffixes, we map an unused virtual address to that address, and return the new virtual address. This is handy for making ".onion" addresses work with applications that resolve an address and then connect to it. (Default: 0) AutomapHostsSuffixes SUFFIX,SUFFIX,... A comma-separated list of suffixes to use with AutomapHostsOnResolve. The "." suffix is equivalent to "all addresses." (Default: .exit,.onion). Bridge [transport] IP:ORPort [fingerprint] When set along with UseBridges, instructs Tor to use the relay at "IP:ORPort" as a "bridge" relaying into the Tor network. If "fingerprint" is provided (using the same format as for DirAuthority), we will verify that the relay running at that location has the right fingerprint. We also use fingerprint to look up the bridge descriptor at the bridge authority, if it’s provided and if UpdateBridgesFromAuthority is set too. If "transport" is provided, it must match a ClientTransportPlugin line. We then use that pluggable transport’s proxy to transfer data to the bridge, rather than connecting to the bridge directly. Some transports use a transport-specific method to work out the remote address to connect to. These transports typically ignore the "IP:ORPort" specified in the bridge line. Tor passes any "key=val" settings to the pluggable transport proxy as per-connection arguments when connecting to the bridge. Consult the documentation of the pluggable transport for details of what arguments it supports. CircuitPadding 0|1 If set to 0, Tor will not pad client circuits with additional cover traffic. Only clients may set this option. This option should be offered via the UI to mobile users for use where bandwidth may be expensive. If set to 1, padding will be negotiated as per the consensus and relay support (unlike ConnectionPadding, CircuitPadding cannot be force-enabled). (Default: 1) ReducedCircuitPadding 0|1 If set to 1, Tor will only use circuit padding algorithms that have low overhead. Only clients may set this option. This option should be offered via the UI to mobile users for use where bandwidth may be expensive. (Default: 0) ClientBootstrapConsensusAuthorityDownloadInitialDelay N Initial delay in seconds for when clients should download consensuses from authorities if they are bootstrapping (that is, they don’t have a usable, reasonably live consensus). Only used by clients fetching from a list of fallback directory mirrors. This schedule is advanced by (potentially concurrent) connection attempts, unlike other schedules, which are advanced by connection failures. (Default: 6) ClientBootstrapConsensusAuthorityOnlyDownloadInitialDelay N Initial delay in seconds for when clients should download consensuses from authorities if they are bootstrapping (that is, they don’t have a usable, reasonably live consensus). Only used by clients which don’t have or won’t fetch from a list of fallback directory mirrors. This schedule is advanced by (potentially concurrent) connection attempts, unlike other schedules, which are advanced by connection failures. (Default: 0) ClientBootstrapConsensusFallbackDownloadInitialDelay N Initial delay in seconds for when clients should download consensuses from fallback directory mirrors if they are bootstrapping (that is, they don’t have a usable, reasonably live consensus). Only used by clients fetching from a list of fallback directory mirrors. This schedule is advanced by (potentially concurrent) connection attempts, unlike other schedules, which are advanced by connection failures. (Default: 0) ClientBootstrapConsensusMaxInProgressTries NUM Try this many simultaneous connections to download a consensus before waiting for one to complete, timeout, or error out. (Default: 3) ClientDNSRejectInternalAddresses 0|1 If true, Tor does not believe any anonymously retrieved DNS answer that tells it that an address resolves to an internal address (like 127.0.0.1 or 192.168.0.1). This option prevents certain browser-based attacks; it is not allowed to be set on the default network. (Default: 1) ClientOnionAuthDir path Path to the directory containing v3 hidden service authorization files. Each file is for a single onion address, and the files MUST have the suffix ".auth_private" (i.e. "bob_onion.auth_private"). The content format MUST be: <onion-address>:descriptor:x25519:<base32-encoded-privkey> The <onion-address> MUST NOT have the ".onion" suffix. The <base32-encoded-privkey> is the base32 representation of the raw key bytes only (32 bytes for x25519). See Appendix G in the rend-spec-v3.txt file of torspec for more information. ClientOnly 0|1 If set to 1, Tor will not run as a relay or serve directory requests, even if the ORPort, ExtORPort, or DirPort options are set. (This config option is mostly unnecessary: we added it back when we were considering having Tor clients auto-promote themselves to being relays if they were stable and fast enough. The current behavior is simply that Tor is a client unless ORPort, ExtORPort, or DirPort are configured.) (Default: 0) ClientPreferIPv6DirPort 0|1|auto If this option is set to 1, Tor prefers a directory port with an IPv6 address over one with IPv4, for direct connections, if a given directory server has both. (Tor also prefers an IPv6 DirPort if IPv4Client is set to 0.) If this option is set to auto, clients prefer IPv4. Other things may influence the choice. This option breaks a tie to the favor of IPv6. (Default: auto) (DEPRECATED: This option has had no effect for some time.) ClientPreferIPv6ORPort 0|1|auto If this option is set to 1, Tor prefers an OR port with an IPv6 address over one with IPv4 if a given entry node has both. (Tor also prefers an IPv6 ORPort if IPv4Client is set to 0.) If this option is set to auto, Tor bridge clients prefer the configured bridge address, and other clients prefer IPv4. Other things may influence the choice. This option breaks a tie to the favor of IPv6. (Default: auto) ClientRejectInternalAddresses 0|1 If true, Tor does not try to fulfill requests to connect to an internal address (like 127.0.0.1 or 192.168.0.1) unless an exit node is specifically requested (for example, via a .exit hostname, or a controller request). If true, multicast DNS hostnames for machines on the local network (of the form *.local) are also rejected. (Default: 1) ClientUseIPv4 0|1 If this option is set to 0, Tor will avoid connecting to directory servers and entry nodes over IPv4. Note that clients with an IPv4 address in a Bridge, proxy, or pluggable transport line will try connecting over IPv4 even if ClientUseIPv4 is set to 0. (Default: 1) ClientUseIPv6 0|1 If this option is set to 1, Tor might connect to directory servers or entry nodes over IPv6. For IPv6 only hosts, you need to also set ClientUseIPv4 to 0 to disable IPv4. Note that clients configured with an IPv6 address in a Bridge, proxy, or pluggable transportline will try connecting over IPv6 even if ClientUseIPv6 is set to 0. (Default: 1) ConnectionPadding 0|1|auto This option governs Tor’s use of padding to defend against some forms of traffic analysis. If it is set to auto, Tor will send padding only if both the client and the relay support it. If it is set to 0, Tor will not send any padding cells. If it is set to 1, Tor will still send padding for client connections regardless of relay support. Only clients may set this option. This option should be offered via the UI to mobile users for use where bandwidth may be expensive. (Default: auto) ReducedConnectionPadding 0|1 If set to 1, Tor will not not hold OR connections open for very long, and will send less padding on these connections. Only clients may set this option. This option should be offered via the UI to mobile users for use where bandwidth may be expensive. (Default: 0) DNSPort [address:]port|auto [isolation flags] If non-zero, open this port to listen for UDP DNS requests, and resolve them anonymously. This port only handles A, AAAA, and PTR requests---it doesn’t handle arbitrary DNS request types. Set the port to "auto" to have Tor pick a port for you. This directive can be specified multiple times to bind to multiple addresses/ports. See SocksPort for an explanation of isolation flags. (Default: 0) DownloadExtraInfo 0|1 If true, Tor downloads and caches "extra-info" documents. These documents contain information about servers other than the information in their regular server descriptors. Tor does not use this information for anything itself; to save bandwidth, leave this option turned off. (Default: 0) EnforceDistinctSubnets 0|1 If 1, Tor will not put two servers whose IP addresses are "too close" on the same circuit. Currently, two addresses are "too close" if they lie in the same /16 range. (Default: 1) FascistFirewall 0|1 If 1, Tor will only create outgoing connections to ORs running on ports that your firewall allows (defaults to 80 and 443; see FirewallPorts). This will allow you to run Tor as a client behind a firewall with restrictive policies, but will not allow you to run as a server behind such a firewall. If you prefer more fine-grained control, use ReachableAddresses instead. FirewallPorts PORTS A list of ports that your firewall allows you to connect to. Only used when FascistFirewall is set. This option is deprecated; use ReachableAddresses instead. (Default: 80, 443) HTTPTunnelPort [address:]port|auto [isolation flags] Open this port to listen for proxy connections using the "HTTP CONNECT" protocol instead of SOCKS. Set this to 0 if you don’t want to allow "HTTP CONNECT" connections. Set the port to "auto" to have Tor pick a port for you. This directive can be specified multiple times to bind to multiple addresses/ports. If multiple entries of this option are present in your configuration file, Tor will perform stream isolation between listeners by default. See SocksPort for an explanation of isolation flags. (Default: 0) LongLivedPorts PORTS A list of ports for services that tend to have long-running connections (e.g. chat and interactive shells). Circuits for streams that use these ports will contain only high-uptime nodes, to reduce the chance that a node will go down before the stream is finished. Note that the list is also honored for circuits (both client and service side) involving hidden services whose virtual port is in this list. (Default: 21, 22, 706, 1863, 5050, 5190, 5222, 5223, 6523, 6667, 6697, 8300) MapAddress address newaddress When a request for address arrives to Tor, it will transform to newaddress before processing it. For example, if you always want connections to www.example.com to exit via torserver (where torserver is the fingerprint of the server), use "MapAddress www.example.com www.example.com.torserver.exit". If the value is prefixed with a "*.", matches an entire domain. For example, if you always want connections to example.com and any if its subdomains to exit via torserver (where torserver is the fingerprint of the server), use "MapAddress *.example.com *.example.com.torserver.exit". (Note the leading "*." in each part of the directive.) You can also redirect all subdomains of a domain to a single address. For example, "MapAddress *.example.com www.example.com". If the specified exit is not available, or the exit can not connect to the site, Tor will fail any connections to the mapped address.+ NOTES: 1. When evaluating MapAddress expressions Tor stops when it hits the most recently added expression that matches the requested address. So if you have the following in your torrc, www.torproject.org will map to 198.51.100.1: MapAddress www.torproject.org 192.0.2.1 MapAddress www.torproject.org 198.51.100.1 2. Tor evaluates the MapAddress configuration until it finds no matches. So if you have the following in your torrc, www.torproject.org will map to 203.0.113.1: MapAddress 198.51.100.1 203.0.113.1 MapAddress www.torproject.org 198.51.100.1 3. The following MapAddress expression is invalid (and will be ignored) because you cannot map from a specific address to a wildcard address: MapAddress www.torproject.org *.torproject.org.torserver.exit 4. Using a wildcard to match only part of a string (as in *ample.com) is also invalid. 5. Tor maps hostnames and IP addresses separately. If you MapAddress a DNS name, but use an IP address to connect, then Tor will ignore the DNS name mapping. 6. MapAddress does not apply to redirects in the application protocol. For example, HTTP redirects and alt-svc headers will ignore mappings for the original address. You can use a wildcard mapping to handle redirects within the same site. MaxCircuitDirtiness NUM Feel free to reuse a circuit that was first used at most NUM seconds ago, but never attach a new stream to a circuit that is too old. For hidden services, this applies to the last time a circuit was used, not the first. Circuits with streams constructed with SOCKS authentication via SocksPorts that have KeepAliveIsolateSOCKSAuth also remain alive for MaxCircuitDirtiness seconds after carrying the last such stream. (Default: 10 minutes) MaxClientCircuitsPending NUM Do not allow more than NUM circuits to be pending at a time for handling client streams. A circuit is pending if we have begun constructing it, but it has not yet been completely constructed. (Default: 32) NATDPort [address:]port|auto [isolation flags] Open this port to listen for connections from old versions of ipfw (as included in old versions of FreeBSD, etc) using the NATD protocol. Use 0 if you don’t want to allow NATD connections. Set the port to "auto" to have Tor pick a port for you. This directive can be specified multiple times to bind to multiple addresses/ports. If multiple entries of this option are present in your configuration file, Tor will perform stream isolation between listeners by default. See SocksPort for an explanation of isolation flags. This option is only for people who cannot use TransPort. (Default: 0) NewCircuitPeriod NUM Every NUM seconds consider whether to build a new circuit. (Default: 30 seconds) PathBiasCircThreshold NUM PathBiasDropGuards NUM PathBiasExtremeRate NUM PathBiasNoticeRate NUM PathBiasWarnRate NUM PathBiasScaleThreshold NUM These options override the default behavior of Tor’s (currently experimental) path bias detection algorithm. To try to find broken or misbehaving guard nodes, Tor looks for nodes where more than a certain fraction of circuits through that guard fail to get built. The PathBiasCircThreshold option controls how many circuits we need to build through a guard before we make these checks. The PathBiasNoticeRate, PathBiasWarnRate and PathBiasExtremeRate options control what fraction of circuits must succeed through a guard so we won’t write log messages. If less than PathBiasExtremeRate circuits succeed and PathBiasDropGuards is set to 1, we disable use of that guard. When we have seen more than PathBiasScaleThreshold circuits through a guard, we scale our observations by 0.5 (governed by the consensus) so that new observations don’t get swamped by old ones. By default, or if a negative value is provided for one of these options, Tor uses reasonable defaults from the networkstatus consensus document. If no defaults are available there, these options default to 150, .70, .50, .30, 0, and 300 respectively. PathBiasUseThreshold NUM PathBiasNoticeUseRate NUM PathBiasExtremeUseRate NUM PathBiasScaleUseThreshold NUM Similar to the above options, these options override the default behavior of Tor’s (currently experimental) path use bias detection algorithm. Where as the path bias parameters govern thresholds for successfully building circuits, these four path use bias parameters govern thresholds only for circuit usage. Circuits which receive no stream usage are not counted by this detection algorithm. A used circuit is considered successful if it is capable of carrying streams or otherwise receiving well-formed responses to RELAY cells. By default, or if a negative value is provided for one of these options, Tor uses reasonable defaults from the networkstatus consensus document. If no defaults are available there, these options default to 20, .80, .60, and 100, respectively. PathsNeededToBuildCircuits NUM Tor clients don’t build circuits for user traffic until they know about enough of the network so that they could potentially construct enough of the possible paths through the network. If this option is set to a fraction between 0.25 and 0.95, Tor won’t build circuits until it has enough descriptors or microdescriptors to construct that fraction of possible paths. Note that setting this option too low can make your Tor client less anonymous, and setting it too high can prevent your Tor client from bootstrapping. If this option is negative, Tor will use a default value chosen by the directory authorities. If the directory authorities do not choose a value, Tor will default to 0.6. (Default: -1) ReachableAddresses IP[/MASK][:PORT]... A comma-separated list of IP addresses and ports that your firewall allows you to connect to. The format is as for the addresses in ExitPolicy, except that "accept" is understood unless "reject" is explicitly provided. For example, 'ReachableAddresses 99.0.0.0/8, reject 18.0.0.0/8:80, accept *:80' means that your firewall allows connections to everything inside net 99, rejects port 80 connections to net 18, and accepts connections to port 80 otherwise. (Default: 'accept *:*'.) ReachableDirAddresses IP[/MASK][:PORT]... Like ReachableAddresses, a list of addresses and ports. Tor will obey these restrictions when fetching directory information, using standard HTTP GET requests. If not set explicitly then the value of ReachableAddresses is used. If HTTPProxy is set then these connections will go through that proxy. (DEPRECATED: This option has had no effect for some time.) ReachableORAddresses IP[/MASK][:PORT]... Like ReachableAddresses, a list of addresses and ports. Tor will obey these restrictions when connecting to Onion Routers, using TLS/SSL. If not set explicitly then the value of ReachableAddresses is used. If HTTPSProxy is set then these connections will go through that proxy. The separation between ReachableORAddresses and ReachableDirAddresses is only interesting when you are connecting through proxies (see HTTPProxy and HTTPSProxy). Most proxies limit TLS connections (which Tor uses to connect to Onion Routers) to port 443, and some limit HTTP GET requests (which Tor uses for fetching directory information) to port 80. SafeSocks 0|1 When this option is enabled, Tor will reject application connections that use unsafe variants of the socks protocol — ones that only provide an IP address, meaning the application is doing a DNS resolve first. Specifically, these are socks4 and socks5 when not doing remote DNS. (Default: 0) TestSocks 0|1 When this option is enabled, Tor will make a notice-level log entry for each connection to the Socks port indicating whether the request used a safe socks protocol or an unsafe one (see SafeSocks). This helps to determine whether an application using Tor is possibly leaking DNS requests. (Default: 0) WarnPlaintextPorts port,port,... Tells Tor to issue a warnings whenever the user tries to make an anonymous connection to one of these ports. This option is designed to alert users to services that risk sending passwords in the clear. (Default: 23,109,110,143) RejectPlaintextPorts port,port,... Like WarnPlaintextPorts, but instead of warning about risky port uses, Tor will instead refuse to make the connection. (Default: None) SocksPolicy policy,policy,... Set an entrance policy for this server, to limit who can connect to the SocksPort and DNSPort ports. The policies have the same form as exit policies below, except that port specifiers are ignored. Any address not matched by some entry in the policy is accepted. SocksPort [address:]port|unix:path|auto [flags] [isolation flags] Open this port to listen for connections from SOCKS-speaking applications. Set this to 0 if you don’t want to allow application connections via SOCKS. Set it to "auto" to have Tor pick a port for you. This directive can be specified multiple times to bind to multiple addresses/ports. If a unix domain socket is used, you may quote the path using standard C escape sequences. Most flags are off by default, except where specified. Flags that are on by default can be disabled by putting "No" before the flag name. (Default: 9050) NOTE: Although this option allows you to specify an IP address other than localhost, you should do so only with extreme caution. The SOCKS protocol is unencrypted and (as we use it) unauthenticated, so exposing it in this way could leak your information to anybody watching your network, and allow anybody to use your computer as an open proxy. If multiple entries of this option are present in your configuration file, Tor will perform stream isolation between listeners by default. The isolation flags arguments give Tor rules for which streams received on this SocksPort are allowed to share circuits with one another. Recognized isolation flags are: IsolateClientAddr Don’t share circuits with streams from a different client address. (On by default and strongly recommended when supported; you can disable it with NoIsolateClientAddr. Unsupported and force-disabled when using Unix domain sockets.) IsolateSOCKSAuth Don’t share circuits with streams for which different SOCKS authentication was provided. (For HTTPTunnelPort connections, this option looks at the Proxy-Authorization and X-Tor-Stream-Isolation headers. On by default; you can disable it with NoIsolateSOCKSAuth.) IsolateClientProtocol Don’t share circuits with streams using a different protocol. (SOCKS 4, SOCKS 5, HTTPTunnelPort connections, TransPort connections, NATDPort connections, and DNSPort requests are all considered to be different protocols.) IsolateDestPort Don’t share circuits with streams targeting a different destination port. IsolateDestAddr Don’t share circuits with streams targeting a different destination address. KeepAliveIsolateSOCKSAuth If IsolateSOCKSAuth is enabled, keep alive circuits while they have at least one stream with SOCKS authentication active. After such a circuit is idle for more than MaxCircuitDirtiness seconds, it can be closed. SessionGroup=INT If no other isolation rules would prevent it, allow streams on this port to share circuits with streams from every other port with the same session group. (By default, streams received on different SocksPorts, TransPorts, etc are always isolated from one another. This option overrides that behavior.) Other recognized flags for a SocksPort are: NoIPv4Traffic Tell exits to not connect to IPv4 addresses in response to SOCKS requests on this connection. IPv6Traffic Tell exits to allow IPv6 addresses in response to SOCKS requests on this connection, so long as SOCKS5 is in use. (SOCKS4 can’t handle IPv6.) PreferIPv6 Tells exits that, if a host has both an IPv4 and an IPv6 address, we would prefer to connect to it via IPv6. (IPv4 is the default.) NoDNSRequest Do not ask exits to resolve DNS addresses in SOCKS5 requests. Tor will connect to IPv4 addresses, IPv6 addresses (if IPv6Traffic is set) and .onion addresses. NoOnionTraffic Do not connect to .onion addresses in SOCKS5 requests. OnionTrafficOnly Tell the tor client to only connect to .onion addresses in response to SOCKS5 requests on this connection. This is equivalent to NoDNSRequest, NoIPv4Traffic, NoIPv6Traffic. The corresponding NoOnionTrafficOnly flag is not supported. CacheIPv4DNS Tells the client to remember IPv4 DNS answers we receive from exit nodes via this connection. CacheIPv6DNS Tells the client to remember IPv6 DNS answers we receive from exit nodes via this connection. GroupWritable Unix domain sockets only: makes the socket get created as group-writable. WorldWritable Unix domain sockets only: makes the socket get created as world-writable. CacheDNS Tells the client to remember all DNS answers we receive from exit nodes via this connection. UseIPv4Cache Tells the client to use any cached IPv4 DNS answers we have when making requests via this connection. (NOTE: This option, or UseIPv6Cache or UseDNSCache, can harm your anonymity, and probably won’t help performance as much as you might expect. Use with care!) UseIPv6Cache Tells the client to use any cached IPv6 DNS answers we have when making requests via this connection. UseDNSCache Tells the client to use any cached DNS answers we have when making requests via this connection. NoPreferIPv6Automap When serving a hostname lookup request on this port that should get automapped (according to AutomapHostsOnResolve), if we could return either an IPv4 or an IPv6 answer, prefer an IPv4 answer. (Tor prefers IPv6 by default.) PreferSOCKSNoAuth Ordinarily, when an application offers both "username/password authentication" and "no authentication" to Tor via SOCKS5, Tor selects username/password authentication so that IsolateSOCKSAuth can work. This can confuse some applications, if they offer a username/password combination then get confused when asked for one. You can disable this behavior, so that Tor will select "No authentication" when IsolateSOCKSAuth is disabled, or when this option is set. ExtendedErrors Return extended error code in the SOCKS reply. So far, the possible errors are: X'F0' Onion Service Descriptor Can Not be Found The requested onion service descriptor can't be found on the hashring and thus not reachable by the client. (v3 only) X'F1' Onion Service Descriptor Is Invalid The requested onion service descriptor can't be parsed or signature validation failed. (v3 only) X'F2' Onion Service Introduction Failed All introduction attempts failed either due to a combination of NACK by the intro point or time out. (v3 only) X'F3' Onion Service Rendezvous Failed Every rendezvous circuit has timed out and thus the client is unable to rendezvous with the service. (v3 only) X'F4' Onion Service Missing Client Authorization Client was able to download the requested onion service descriptor but is unable to decrypt its content because it is missing client authorization information. (v3 only) X'F5' Onion Service Wrong Client Authorization Client was able to download the requested onion service descriptor but is unable to decrypt its content using the client authorization information it has. This means the client access were revoked. (v3 only) X'F6' Onion Service Invalid Address The given .onion address is invalid. In one of these cases this error is returned: address checksum doesn't match, ed25519 public key is invalid or the encoding is invalid. (v3 only) X'F7' Onion Service Introduction Timed Out Similar to X'F2' code but in this case, all introduction attempts have failed due to a time out. (v3 only) Flags are processed left to right. If flags conflict, the last flag on the line is used, and all earlier flags are ignored. No error is issued for conflicting flags. TokenBucketRefillInterval NUM [msec|second] Set the refill delay interval of Tor’s token bucket to NUM milliseconds. NUM must be between 1 and 1000, inclusive. When Tor is out of bandwidth, on a connection or globally, it will wait up to this long before it tries to use that connection again. Note that bandwidth limits are still expressed in bytes per second: this option only affects the frequency with which Tor checks to see whether previously exhausted connections may read again. Can not be changed while tor is running. (Default: 100 msec) TrackHostExits host,.domain,... For each value in the comma separated list, Tor will track recent connections to hosts that match this value and attempt to reuse the same exit node for each. If the value is prepended with a '.', it is treated as matching an entire domain. If one of the values is just a '.', it means match everything. This option is useful if you frequently connect to sites that will expire all your authentication cookies (i.e. log you out) if your IP address changes. Note that this option does have the disadvantage of making it more clear that a given history is associated with a single user. However, most people who would wish to observe this will observe it through cookies or other protocol-specific means anyhow. TrackHostExitsExpire NUM Since exit servers go up and down, it is desirable to expire the association between host and exit server after NUM seconds. The default is 1800 seconds (30 minutes). TransPort [address:]port|auto [isolation flags] Open this port to listen for transparent proxy connections. Set this to 0 if you don’t want to allow transparent proxy connections. Set the port to "auto" to have Tor pick a port for you. This directive can be specified multiple times to bind to multiple addresses/ports. If multiple entries of this option are present in your configuration file, Tor will perform stream isolation between listeners by default. See SocksPort for an explanation of isolation flags. TransPort requires OS support for transparent proxies, such as BSDs' pf or Linux’s IPTables. If you’re planning to use Tor as a transparent proxy for a network, you’ll want to examine and change VirtualAddrNetwork from the default setting. (Default: 0) TransProxyType default|TPROXY|ipfw|pf-divert TransProxyType may only be enabled when there is transparent proxy listener enabled. Set this to "TPROXY" if you wish to be able to use the TPROXY Linux module to transparently proxy connections that are configured using the TransPort option. Detailed information on how to configure the TPROXY feature can be found in the Linux kernel source tree in the file Documentation/networking/tproxy.txt. Set this option to "ipfw" to use the FreeBSD ipfw interface. On *BSD operating systems when using pf, set this to "pf-divert" to take advantage of divert-to rules, which do not modify the packets like rdr-to rules do. Detailed information on how to configure pf to use divert-to rules can be found in the pf.conf(5) manual page. On OpenBSD, divert-to is available to use on versions greater than or equal to OpenBSD 4.4. Set this to "default", or leave it unconfigured, to use regular IPTables on Linux, or to use pf rdr-to rules on *BSD systems. (Default: "default") UpdateBridgesFromAuthority 0|1 When set (along with UseBridges), Tor will try to fetch bridge descriptors from the configured bridge authorities when feasible. It will fall back to a direct request if the authority responds with a 404. (Default: 0) UseBridges 0|1 When set, Tor will fetch descriptors for each bridge listed in the "Bridge" config lines, and use these relays as both entry guards and directory guards. (Default: 0) UseEntryGuards 0|1 If this option is set to 1, we pick a few long-term entry servers, and try to stick with them. This is desirable because constantly changing servers increases the odds that an adversary who owns some servers will observe a fraction of your paths. Entry Guards can not be used by Directory Authorities or Single Onion Services. In these cases, this option is ignored. (Default: 1) UseGuardFraction 0|1|auto This option specifies whether clients should use the guardfraction information found in the consensus during path selection. If it’s set to auto, clients will do what the UseGuardFraction consensus parameter tells them to do. (Default: auto) GuardLifetime N days|weeks|months If UseEntryGuards is set, minimum time to keep a guard on our guard list before picking a new one. If less than one day, we use defaults from the consensus directory. (Default: 0) NumDirectoryGuards NUM If UseEntryGuards is set to 1, we try to make sure we have at least NUM routers to use as directory guards. If this option is set to 0, use the value from the guard-n-primary-dir-guards-to-use consensus parameter, and default to 3 if the consensus parameter isn’t set. (Default: 0) NumEntryGuards NUM If UseEntryGuards is set to 1, we will try to pick a total of NUM routers as long-term entries for our circuits. If NUM is 0, we try to learn the number from the guard-n-primary-guards-to-use consensus parameter, and default to 1 if the consensus parameter isn’t set. (Default: 0) NumPrimaryGuards NUM If UseEntryGuards is set to 1, we will try to pick NUM routers for our primary guard list, which is the set of routers we strongly prefer when connecting to the Tor network. If NUM is 0, we try to learn the number from the guard-n-primary-guards consensus parameter, and default to 3 if the consensus parameter isn’t set. (Default: 0) VanguardsLiteEnabled 0|1|auto This option specifies whether clients should use the vanguards-lite subsystem to protect against guard discovery attacks. If it’s set to auto, clients will do what the vanguards-lite-enabled consensus parameter tells them to do, and will default to enable the subsystem if the consensus parameter isn’t set. (Default: auto) UseMicrodescriptors 0|1|auto Microdescriptors are a smaller version of the information that Tor needs in order to build its circuits. Using microdescriptors makes Tor clients download less directory information, thus saving bandwidth. Directory caches need to fetch regular descriptors and microdescriptors, so this option doesn’t save any bandwidth for them. For legacy reasons, auto is accepted, but it has the same effect as 1. (Default: auto) VirtualAddrNetworkIPv4 IPv4Address/bits VirtualAddrNetworkIPv6 [IPv6Address]/bits When Tor needs to assign a virtual (unused) address because of a MAPADDRESS command from the controller or the AutomapHostsOnResolve feature, Tor picks an unassigned address from this range. (Defaults: 127.192.0.0/10 and [FE80::]/10 respectively.) When providing proxy server service to a network of computers using a tool like dns-proxy-tor, change the IPv4 network to "10.192.0.0/10" or "172.16.0.0/12" and change the IPv6 network to "[FC00::]/7". The default VirtualAddrNetwork address ranges on a properly configured machine will route to the loopback or link-local interface. The maximum number of bits for the network prefix is set to 104 for IPv6 and 16 for IPv4. However, a larger network (that is, one with a smaller prefix length) is preferable, since it reduces the chances for an attacker to guess the used IP. For local use, no change to the default VirtualAddrNetwork setting is needed. CIRCUIT TIMEOUT OPTIONS The following options are useful for configuring timeouts related to building Tor circuits and using them: CircuitsAvailableTimeout NUM Tor will attempt to keep at least one open, unused circuit available for this amount of time. This option governs how long idle circuits are kept open, as well as the amount of time Tor will keep a circuit open to each of the recently used ports. This way when the Tor client is entirely idle, it can expire all of its circuits, and then expire its TLS connections. Note that the actual timeout value is uniformly randomized from the specified value to twice that amount. (Default: 30 minutes; Max: 24 hours) LearnCircuitBuildTimeout 0|1 If 0, CircuitBuildTimeout adaptive learning is disabled. (Default: 1) CircuitBuildTimeout NUM Try for at most NUM seconds when building circuits. If the circuit isn’t open in that time, give up on it. If LearnCircuitBuildTimeout is 1, this value serves as the initial value to use before a timeout is learned. If LearnCircuitBuildTimeout is 0, this value is the only value used. (Default: 60 seconds) CircuitStreamTimeout NUM If non-zero, this option overrides our internal timeout schedule for how many seconds until we detach a stream from a circuit and try a new circuit. If your network is particularly slow, you might want to set this to a number like 60. (Default: 0) SocksTimeout NUM Let a socks connection wait NUM seconds handshaking, and NUM seconds unattached waiting for an appropriate circuit, before we fail it. (Default: 2 minutes) DORMANT MODE OPTIONS Tor can enter dormant mode to conserve power and network bandwidth. The following options control when Tor enters and leaves dormant mode: DormantCanceledByStartup 0|1 By default, Tor starts in active mode if it was active the last time it was shut down, and in dormant mode if it was dormant. But if this option is true, Tor treats every startup event as user activity, and Tor will never start in Dormant mode, even if it has been unused for a long time on previous runs. (Default: 0) Note: Packagers and application developers should change the value of this option only with great caution: it has the potential to create spurious traffic on the network. This option should only be used if Tor is started by an affirmative user activity (like clicking on an application or running a command), and not if Tor is launched for some other reason (for example, by a startup process, or by an application that launches itself on every login.) DormantClientTimeout N minutes|hours|days|weeks If Tor spends this much time without any client activity, enter a dormant state where automatic circuits are not built, and directory information is not fetched. Does not affect servers or onion services. Must be at least 10 minutes. (Default: 24 hours) DormantOnFirstStartup 0|1 If true, then the first time Tor starts up with a fresh DataDirectory, it starts in dormant mode, and takes no actions until the user has made a request. (This mode is recommended if installing a Tor client for a user who might not actually use it.) If false, Tor bootstraps the first time it is started, whether it sees a user request or not. After the first time Tor starts, it begins in dormant mode if it was dormant before, and not otherwise. (Default: 0) DormantTimeoutDisabledByIdleStreams 0|1 If true, then any open client stream (even one not reading or writing) counts as client activity for the purpose of DormantClientTimeout. If false, then only network activity counts. (Default: 1) DormantTimeoutEnabled 0|1 If false, then no amount of time without activity is sufficient to make Tor go dormant. Setting this option to zero is only recommended for special-purpose applications that need to use the Tor binary for something other than sending or receiving Tor traffic. (Default: 1) NODE SELECTION OPTIONS The following options restrict the nodes that a tor client (or onion service) can use while building a circuit. These options can weaken your anonymity by making your client behavior different from other Tor clients: EntryNodes node,node,... A list of identity fingerprints and country codes of nodes to use for the first hop in your normal circuits. Normal circuits include all circuits except for direct connections to directory servers. The Bridge option overrides this option; if you have configured bridges and UseBridges is 1, the Bridges are used as your entry nodes. This option can appear multiple times: the values from multiple lines are spliced together. The ExcludeNodes option overrides this option: any node listed in both EntryNodes and ExcludeNodes is treated as excluded. See ExcludeNodes for more information on how to specify nodes. ExcludeNodes node,node,... A list of identity fingerprints, country codes, and address patterns of nodes to avoid when building a circuit. Country codes are 2-letter ISO3166 codes, and must be wrapped in braces; fingerprints may be preceded by a dollar sign. (Example: ExcludeNodes ABCD1234CDEF5678ABCD1234CDEF5678ABCD1234, {cc}, 255.254.0.0/8) This option can appear multiple times: the values from multiple lines are spliced together. By default, this option is treated as a preference that Tor is allowed to override in order to keep working. For example, if you try to connect to a hidden service, but you have excluded all of the hidden service’s introduction points, Tor will connect to one of them anyway. If you do not want this behavior, set the StrictNodes option (documented below). Note also that if you are a relay, this (and the other node selection options below) only affects your own circuits that Tor builds for you. Clients can still build circuits through you to any node. Controllers can tell Tor to build circuits through any node. Country codes are case-insensitive. The code "{??}" refers to nodes whose country can’t be identified. No country code, including {??}, works if no GeoIPFile can be loaded. See also the GeoIPExcludeUnknown option below. ExcludeExitNodes node,node,... A list of identity fingerprints, country codes, and address patterns of nodes to never use when picking an exit node---that is, a node that delivers traffic for you outside the Tor network. Note that any node listed in ExcludeNodes is automatically considered to be part of this list too. See ExcludeNodes for more information on how to specify nodes. See also the caveats on the ExitNodes option below. This option can appear multiple times: the values from multiple lines are spliced together. ExitNodes node,node,... A list of identity fingerprints, country codes, and address patterns of nodes to use as exit node---that is, a node that delivers traffic for you outside the Tor network. See ExcludeNodes for more information on how to specify nodes. This option can appear multiple times: the values from multiple lines are spliced together. Note that if you list too few nodes here, or if you exclude too many exit nodes with ExcludeExitNodes, you can degrade functionality. For example, if none of the exits you list allows traffic on port 80 or 443, you won’t be able to browse the web. Note also that not every circuit is used to deliver traffic outside of the Tor network. It is normal to see non-exit circuits (such as those used to connect to hidden services, those that do directory fetches, those used for relay reachability self-tests, and so on) that end at a non-exit node. To keep a node from being used entirely, see ExcludeNodes and StrictNodes. The ExcludeNodes option overrides this option: any node listed in both ExitNodes and ExcludeNodes is treated as excluded. The .exit address notation, if enabled via MapAddress, overrides this option. GeoIPExcludeUnknown 0|1|auto If this option is set to auto, then whenever any country code is set in ExcludeNodes or ExcludeExitNodes, all nodes with unknown country ({??} and possibly {A1}) are treated as excluded as well. If this option is set to 1, then all unknown countries are treated as excluded in ExcludeNodes and ExcludeExitNodes. This option has no effect when a GeoIP file isn’t configured or can’t be found. (Default: auto) HSLayer2Nodes node,node,... A list of identity fingerprints, nicknames, country codes, and address patterns of nodes that are allowed to be used as the second hop in all client or service-side Onion Service circuits. This option mitigates attacks where the adversary runs middle nodes and induces your client or service to create many circuits, in order to discover your primary guard node. (Default: Any node in the network may be used in the second hop.) (Example: HSLayer2Nodes ABCD1234CDEF5678ABCD1234CDEF5678ABCD1234, {cc}, 255.254.0.0/8) This option can appear multiple times: the values from multiple lines are spliced together. When this is set, the resulting hidden service paths will look like: C - G - L2 - M - Rend C - G - L2 - M - HSDir C - G - L2 - M - Intro S - G - L2 - M - Rend S - G - L2 - M - HSDir S - G - L2 - M - Intro where C is this client, S is the service, G is the Guard node, L2 is a node from this option, and M is a random middle node. Rend, HSDir, and Intro point selection is not affected by this option. This option may be combined with HSLayer3Nodes to create paths of the form: C - G - L2 - L3 - Rend C - G - L2 - L3 - M - HSDir C - G - L2 - L3 - M - Intro S - G - L2 - L3 - M - Rend S - G - L2 - L3 - HSDir S - G - L2 - L3 - Intro ExcludeNodes have higher priority than HSLayer2Nodes, which means that nodes specified in ExcludeNodes will not be picked. When either this option or HSLayer3Nodes are set, the /16 subnet and node family restrictions are removed for hidden service circuits. Additionally, we allow the guard node to be present as the Rend, HSDir, and IP node, and as the hop before it. This is done to prevent the adversary from inferring information about our guard, layer2, and layer3 node choices at later points in the path. This option is meant to be managed by a Tor controller such as https://github.com/mikeperry-tor/vanguards that selects and updates this set of nodes for you. Hence it does not do load balancing if fewer than 20 nodes are selected, and if no nodes in HSLayer2Nodes are currently available for use, Tor will not work. Please use extreme care if you are setting this option manually. HSLayer3Nodes node,node,... A list of identity fingerprints, nicknames, country codes, and address patterns of nodes that are allowed to be used as the third hop in all client and service-side Onion Service circuits. This option mitigates attacks where the adversary runs middle nodes and induces your client or service to create many circuits, in order to discover your primary or Layer2 guard nodes. (Default: Any node in the network may be used in the third hop.) (Example: HSLayer3Nodes ABCD1234CDEF5678ABCD1234CDEF5678ABCD1234, {cc}, 255.254.0.0/8) This option can appear multiple times: the values from multiple lines are spliced together. When this is set by itself, the resulting hidden service paths will look like: C - G - M - L3 - Rend C - G - M - L3 - M - HSDir C - G - M - L3 - M - Intro S - G - M - L3 - M - Rend S - G - M - L3 - HSDir S - G - M - L3 - Intro where C is this client, S is the service, G is the Guard node, L2 is a node from this option, and M is a random middle node. Rend, HSDir, and Intro point selection is not affected by this option. While it is possible to use this option by itself, it should be combined with HSLayer2Nodes to create paths of the form: C - G - L2 - L3 - Rend C - G - L2 - L3 - M - HSDir C - G - L2 - L3 - M - Intro S - G - L2 - L3 - M - Rend S - G - L2 - L3 - HSDir S - G - L2 - L3 - Intro ExcludeNodes have higher priority than HSLayer3Nodes, which means that nodes specified in ExcludeNodes will not be picked. When either this option or HSLayer2Nodes are set, the /16 subnet and node family restrictions are removed for hidden service circuits. Additionally, we allow the guard node to be present as the Rend, HSDir, and IP node, and as the hop before it. This is done to prevent the adversary from inferring information about our guard, layer2, and layer3 node choices at later points in the path. This option is meant to be managed by a Tor controller such as https://github.com/mikeperry-tor/vanguards that selects and updates this set of nodes for you. Hence it does not do load balancing if fewer than 20 nodes are selected, and if no nodes in HSLayer3Nodes are currently available for use, Tor will not work. Please use extreme care if you are setting this option manually. MiddleNodes node,node,... A list of identity fingerprints and country codes of nodes to use for "middle" hops in your normal circuits. Normal circuits include all circuits except for direct connections to directory servers. Middle hops are all hops other than exit and entry. This option can appear multiple times: the values from multiple lines are spliced together. This is an experimental feature that is meant to be used by researchers and developers to test new features in the Tor network safely. Using it without care will strongly influence your anonymity. Other tor features may not work with MiddleNodes. This feature might get removed in the future. The HSLayer2Node and HSLayer3Node options override this option for onion service circuits, if they are set. The vanguards addon will read this option, and if set, it will set HSLayer2Nodes and HSLayer3Nodes to nodes from this set. The ExcludeNodes option overrides this option: any node listed in both MiddleNodes and ExcludeNodes is treated as excluded. See the <<ExcludeNodes,ExcludeNodes>> for more information on how to specify nodes. NodeFamily node,node,... The Tor servers, defined by their identity fingerprints, constitute a "family" of similar or co-administered servers, so never use any two of them in the same circuit. Defining a NodeFamily is only needed when a server doesn’t list the family itself (with MyFamily). This option can be used multiple times; each instance defines a separate family. In addition to nodes, you can also list IP address and ranges and country codes in {curly braces}. See ExcludeNodes for more information on how to specify nodes. StrictNodes 0|1 If StrictNodes is set to 1, Tor will treat solely the ExcludeNodes option as a requirement to follow for all the circuits you generate, even if doing so will break functionality for you (StrictNodes does not apply to ExcludeExitNodes, ExitNodes, MiddleNodes, or MapAddress). If StrictNodes is set to 0, Tor will still try to avoid nodes in the ExcludeNodes list, but it will err on the side of avoiding unexpected errors. Specifically, StrictNodes 0 tells Tor that it is okay to use an excluded node when it is necessary to perform relay reachability self-tests, connect to a hidden service, provide a hidden service to a client, fulfill a .exit request, upload directory information, or download directory information. (Default: 0) SERVER OPTIONS The following options are useful only for servers (that is, if ORPort is non-zero): AccountingMax N bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits Limits the max number of bytes sent and received within a set time period using a given calculation rule (see AccountingStart and AccountingRule). Useful if you need to stay under a specific bandwidth. By default, the number used for calculation is the max of either the bytes sent or received. For example, with AccountingMax set to 1 TByte, a server could send 900 GBytes and receive 800 GBytes and continue running. It will only hibernate once one of the two reaches 1 TByte. This can be changed to use the sum of the both bytes received and sent by setting the AccountingRule option to "sum" (total bandwidth in/out). When the number of bytes remaining gets low, Tor will stop accepting new connections and circuits. When the number of bytes is exhausted, Tor will hibernate until some time in the next accounting period. To prevent all servers from waking at the same time, Tor will also wait until a random point in each period before waking up. If you have bandwidth cost issues, enabling hibernation is preferable to setting a low bandwidth, since it provides users with a collection of fast servers that are up some of the time, which is more useful than a set of slow servers that are always "available". Note that (as also described in the Bandwidth section) Tor uses powers of two, not powers of ten: 1 GByte is 1024*1024*1024, not one billion. Be careful: some internet service providers might count GBytes differently. AccountingRule sum|max|in|out How we determine when our AccountingMax has been reached (when we should hibernate) during a time interval. Set to "max" to calculate using the higher of either the sent or received bytes (this is the default functionality). Set to "sum" to calculate using the sent plus received bytes. Set to "in" to calculate using only the received bytes. Set to "out" to calculate using only the sent bytes. (Default: max) AccountingStart day|week|month [day] HH:MM Specify how long accounting periods last. If month is given, each accounting period runs from the time HH:MM on the dayth day of one month to the same day and time of the next. The relay will go at full speed, use all the quota you specify, then hibernate for the rest of the period. (The day must be between 1 and 28.) If week is given, each accounting period runs from the time HH:MM of the dayth day of one week to the same day and time of the next week, with Monday as day 1 and Sunday as day 7. If day is given, each accounting period runs from the time HH:MM each day to the same time on the next day. All times are local, and given in 24-hour time. (Default: "month 1 0:00") Address address The address of this server, or a fully qualified domain name of this server that resolves to an address. You can leave this unset, and Tor will try to guess your address. If a domain name is provided, Tor will attempt to resolve it and use the underlying IPv4/IPv6 address as its publish address (taking precedence over the ORPort configuration). The publish address is the one used to tell clients and other servers where to find your Tor server; it doesn’t affect the address that your server binds to. To bind to a different address, use the ORPort and OutboundBindAddress options. AddressDisableIPv6 0|1 By default, Tor will attempt to find the IPv6 of the relay if there is no IPv4Only ORPort. If set, this option disables IPv6 auto discovery. This disables IPv6 address resolution, IPv6 ORPorts, and IPv6 reachability checks. Also, the relay won’t publish an IPv6 ORPort in its descriptor. (Default: 0) AssumeReachable 0|1 This option is used when bootstrapping a new Tor network. If set to 1, don’t do self-reachability testing; just upload your server descriptor immediately. (Default: 0) AssumeReachableIPv6 0|1|auto Like AssumeReachable, but affects only the relay’s own IPv6 ORPort. If this value is set to "auto", then Tor will look at AssumeReachable instead. (Default: auto) BridgeRelay 0|1 Sets the relay to act as a "bridge" with respect to relaying connections from bridge users to the Tor network. It mainly causes Tor to publish a server descriptor to the bridge database, rather than to the public directory authorities. Note: make sure that no MyFamily lines are present in your torrc when relay is configured in bridge mode. BridgeDistribution string If set along with BridgeRelay, Tor will include a new line in its bridge descriptor which indicates to the BridgeDB service how it would like its bridge address to be given out. Set it to "none" if you want BridgeDB to avoid distributing your bridge address, or "any" to let BridgeDB decide. See https://bridges.torproject.org/info for a more up-to-date list of options. (Default: any) ContactInfo email_address Administrative contact information for this relay or bridge. This line can be used to contact you if your relay or bridge is misconfigured or something else goes wrong. Note that we archive and publish all descriptors containing these lines and that Google indexes them, so spammers might also collect them. You may want to obscure the fact that it’s an email address and/or generate a new address for this purpose. ContactInfo must be set to a working address if you run more than one relay or bridge. (Really, everybody running a relay or bridge should set it.) DisableOOSCheck 0|1 This option disables the code that closes connections when Tor notices that it is running low on sockets. Right now, it is on by default, since the existing out-of-sockets mechanism tends to kill OR connections more than it should. (Default: 1) ExitPolicy policy,policy,... Set an exit policy for this server. Each policy is of the form "accept[6]|reject[6] ADDR[/MASK][:PORT]". If /MASK is omitted then this policy just applies to the host given. Instead of giving a host or network you can also use "*" to denote the universe (0.0.0.0/0 and ::/0), or *4 to denote all IPv4 addresses, and *6 to denote all IPv6 addresses. PORT can be a single port number, an interval of ports "FROM_PORT-TO_PORT", or "*". If PORT is omitted, that means "*". For example, "accept 18.7.22.69:*,reject 18.0.0.0/8:*,accept *:*" would reject any IPv4 traffic destined for MIT except for web.mit.edu, and accept any other IPv4 or IPv6 traffic. Tor also allows IPv6 exit policy entries. For instance, "reject6 [FC00::]/7:*" rejects all destinations that share 7 most significant bit prefix with address FC00::. Respectively, "accept6 [C000::]/3:*" accepts all destinations that share 3 most significant bit prefix with address C000::. accept6 and reject6 only produce IPv6 exit policy entries. Using an IPv4 address with accept6 or reject6 is ignored and generates a warning. accept/reject allows either IPv4 or IPv6 addresses. Use *4 as an IPv4 wildcard address, and *6 as an IPv6 wildcard address. accept/reject * expands to matching IPv4 and IPv6 wildcard address rules. To specify all IPv4 and IPv6 internal and link-local networks (including 0.0.0.0/8, 169.254.0.0/16, 127.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, [::]/8, [FC00::]/7, [FE80::]/10, [FEC0::]/10, [FF00::]/8, and [::]/127), you can use the "private" alias instead of an address. ("private" always produces rules for IPv4 and IPv6 addresses, even when used with accept6/reject6.) Private addresses are rejected by default (at the beginning of your exit policy), along with any configured primary public IPv4 and IPv6 addresses. These private addresses are rejected unless you set the ExitPolicyRejectPrivate config option to 0. For example, once you’ve done that, you could allow HTTP to 127.0.0.1 and block all other connections to internal networks with "accept 127.0.0.1:80,reject private:*", though that may also allow connections to your own computer that are addressed to its public (external) IP address. See RFC 1918 and RFC 3330 for more details about internal and reserved IP address space. See ExitPolicyRejectLocalInterfaces if you want to block every address on the relay, even those that aren’t advertised in the descriptor. This directive can be specified multiple times so you don’t have to put it all on one line. Policies are considered first to last, and the first match wins. If you want to allow the same ports on IPv4 and IPv6, write your rules using accept/reject *. If you want to allow different ports on IPv4 and IPv6, write your IPv6 rules using accept6/reject6 *6, and your IPv4 rules using accept/reject *4. If you want to _replace_ the default exit policy, end your exit policy with either a reject *:* or an accept *:*. Otherwise, you’re _augmenting_ (prepending to) the default exit policy. If you want to use a reduced exit policy rather than the default exit policy, set "ReducedExitPolicy 1". If you want to replace the default exit policy with your custom exit policy, end your exit policy with either a reject : or an accept :. Otherwise, you’re augmenting (prepending to) the default or reduced exit policy. The default exit policy is: reject *:25 reject *:119 reject *:135-139 reject *:445 reject *:563 reject *:1214 reject *:4661-4666 reject *:6346-6429 reject *:6699 reject *:6881-6999 accept *:* Since the default exit policy uses accept/reject *, it applies to both IPv4 and IPv6 addresses. ExitPolicyRejectLocalInterfaces 0|1 Reject all IPv4 and IPv6 addresses that the relay knows about, at the beginning of your exit policy. This includes any OutboundBindAddress, the bind addresses of any port options, such as ControlPort or DNSPort, and any public IPv4 and IPv6 addresses on any interface on the relay. (If IPv6Exit is not set, all IPv6 addresses will be rejected anyway.) See above entry on ExitPolicy. This option is off by default, because it lists all public relay IP addresses in the ExitPolicy, even those relay operators might prefer not to disclose. (Default: 0) ExitPolicyRejectPrivate 0|1 Reject all private (local) networks, along with the relay’s advertised public IPv4 and IPv6 addresses, at the beginning of your exit policy. See above entry on ExitPolicy. (Default: 1) ExitRelay 0|1|auto Tells Tor whether to run as an exit relay. If Tor is running as a non-bridge server, and ExitRelay is set to 1, then Tor allows traffic to exit according to the ExitPolicy option, the ReducedExitPolicy option, or the default ExitPolicy (if no other exit policy option is specified). If ExitRelay is set to 0, no traffic is allowed to exit, and the ExitPolicy, ReducedExitPolicy, and IPv6Exit options are ignored. If ExitRelay is set to "auto", then Tor checks the ExitPolicy, ReducedExitPolicy, and IPv6Exit options. If at least one of these options is set, Tor behaves as if ExitRelay were set to 1. If none of these exit policy options are set, Tor behaves as if ExitRelay were set to 0. (Default: auto) ExtendAllowPrivateAddresses 0|1 When this option is enabled, Tor will connect to relays on localhost, RFC1918 addresses, and so on. In particular, Tor will make direct OR connections, and Tor routers allow EXTEND requests, to these private addresses. (Tor will always allow connections to bridges, proxies, and pluggable transports configured on private addresses.) Enabling this option can create security issues; you should probably leave it off. (Default: 0) GeoIPFile filename A filename containing IPv4 GeoIP data, for use with by-country statistics. GeoIPv6File filename A filename containing IPv6 GeoIP data, for use with by-country statistics. HeartbeatPeriod N minutes|hours|days|weeks Log a heartbeat message every HeartbeatPeriod seconds. This is a log level notice message, designed to let you know your Tor server is still alive and doing useful things. Settings this to 0 will disable the heartbeat. Otherwise, it must be at least 30 minutes. (Default: 6 hours) IPv6Exit 0|1 If set, and we are an exit node, allow clients to use us for IPv6 traffic. When this option is set and ExitRelay is auto, we act as if ExitRelay is 1. (Default: 0) KeyDirectory DIR Store secret keys in DIR. Can not be changed while tor is running. (Default: the "keys" subdirectory of DataDirectory.) KeyDirectoryGroupReadable 0|1|auto If this option is set to 0, don’t allow the filesystem group to read the KeyDirectory. If the option is set to 1, make the KeyDirectory readable by the default GID. If the option is "auto", then we use the setting for DataDirectoryGroupReadable when the KeyDirectory is the same as the DataDirectory, and 0 otherwise. (Default: auto) MainloopStats 0|1 Log main loop statistics every HeartbeatPeriod seconds. This is a log level notice message designed to help developers instrumenting Tor’s main event loop. (Default: 0) MaxMemInQueues N bytes|KBytes|MBytes|GBytes This option configures a threshold above which Tor will assume that it needs to stop queueing or buffering data because it’s about to run out of memory. If it hits this threshold, it will begin killing circuits until it has recovered at least 10% of this memory. Do not set this option too low, or your relay may be unreliable under load. This option only affects some queues, so the actual process size will be larger than this. If this option is set to 0, Tor will try to pick a reasonable default based on your system’s physical memory. (Default: 0) MaxOnionQueueDelay NUM [msec|second] If we have more onionskins queued for processing than we can process in this amount of time, reject new ones. (Default: 1750 msec) MyFamily fingerprint,fingerprint,... Declare that this Tor relay is controlled or administered by a group or organization identical or similar to that of the other relays, defined by their (possibly $-prefixed) identity fingerprints. This option can be repeated many times, for convenience in defining large families: all fingerprints in all MyFamily lines are merged into one list. When two relays both declare that they are in the same 'family', Tor clients will not use them in the same circuit. (Each relay only needs to list the other servers in its family; it doesn’t need to list itself, but it won’t hurt if it does.) Do not list any bridge relay as it would compromise its concealment. If you run more than one relay, the MyFamily option on each relay must list all other relays, as described above. Note: do not use MyFamily when configuring your Tor instance as a bridge. Nickname name Set the server’s nickname to 'name'. Nicknames must be between 1 and 19 characters inclusive, and must contain only the characters [a-zA-Z0-9]. If not set, Unnamed will be used. Relays can always be uniquely identified by their identity fingerprints. NumCPUs num How many processes to use at once for decrypting onionskins and other parallelizable operations. If this is set to 0, Tor will try to detect how many CPUs you have, defaulting to 1 if it can’t tell. (Default: 0) OfflineMasterKey 0|1 If non-zero, the Tor relay will never generate or load its master secret key. Instead, you’ll have to use "tor --keygen" to manage the permanent ed25519 master identity key, as well as the corresponding temporary signing keys and certificates. (Default: 0) ORPort [address:]PORT|auto [flags] Advertise this port to listen for connections from Tor clients and servers. This option is required to be a Tor server. Set it to "auto" to have Tor pick a port for you. Set it to 0 to not run an ORPort at all. This option can occur more than once. (Default: 0) Tor recognizes these flags on each ORPort: NoAdvertise By default, we bind to a port and tell our users about it. If NoAdvertise is specified, we don’t advertise, but listen anyway. This can be useful if the port everybody will be connecting to (for example, one that’s opened on our firewall) is somewhere else. NoListen By default, we bind to a port and tell our users about it. If NoListen is specified, we don’t bind, but advertise anyway. This can be useful if something else (for example, a firewall’s port forwarding configuration) is causing connections to reach us. IPv4Only If the address is absent, or resolves to both an IPv4 and an IPv6 address, only listen to the IPv4 address. IPv6Only If the address is absent, or resolves to both an IPv4 and an IPv6 address, only listen to the IPv6 address. For obvious reasons, NoAdvertise and NoListen are mutually exclusive, and IPv4Only and IPv6Only are mutually exclusive. PublishServerDescriptor 0|1|v3|bridge,... This option specifies which descriptors Tor will publish when acting as a relay. You can choose multiple arguments, separated by commas. If this option is set to 0, Tor will not publish its descriptors to any directories. (This is useful if you’re testing out your server, or if you’re using a Tor controller that handles directory publishing for you.) Otherwise, Tor will publish its descriptors of all type(s) specified. The default is "1", which means "if running as a relay or bridge, publish descriptors to the appropriate authorities". Other possibilities are "v3", meaning "publish as if you’re a relay", and "bridge", meaning "publish as if you’re a bridge". ReducedExitPolicy 0|1 If set, use a reduced exit policy rather than the default one. The reduced exit policy is an alternative to the default exit policy. It allows as many Internet services as possible while still blocking the majority of TCP ports. Currently, the policy allows approximately 65 ports. This reduces the odds that your node will be used for peer-to-peer applications. The reduced exit policy is: accept *:20-21 accept *:22 accept *:23 accept *:43 accept *:53 accept *:79 accept *:80-81 accept *:88 accept *:110 accept *:143 accept *:194 accept *:220 accept *:389 accept *:443 accept *:464 accept *:465 accept *:531 accept *:543-544 accept *:554 accept *:563 accept *:587 accept *:636 accept *:706 accept *:749 accept *:873 accept *:902-904 accept *:981 accept *:989-990 accept *:991 accept *:992 accept *:993 accept *:994 accept *:995 accept *:1194 accept *:1220 accept *:1293 accept *:1500 accept *:1533 accept *:1677 accept *:1723 accept *:1755 accept *:1863 accept *:2082 accept *:2083 accept *:2086-2087 accept *:2095-2096 accept *:2102-2104 accept *:3128 accept *:3389 accept *:3690 accept *:4321 accept *:4643 accept *:5050 accept *:5190 accept *:5222-5223 accept *:5228 accept *:5900 accept *:6660-6669 accept *:6679 accept *:6697 accept *:8000 accept *:8008 accept *:8074 accept *:8080 accept *:8082 accept *:8087-8088 accept *:8232-8233 accept *:8332-8333 accept *:8443 accept *:8888 accept *:9418 accept *:9999 accept *:10000 accept *:11371 accept *:19294 accept *:19638 accept *:50002 accept *:64738 reject *:* (Default: 0) RefuseUnknownExits 0|1|auto Prevent nodes that don’t appear in the consensus from exiting using this relay. If the option is 1, we always block exit attempts from such nodes; if it’s 0, we never do, and if the option is "auto", then we do whatever the authorities suggest in the consensus (and block if the consensus is quiet on the issue). (Default: auto) ServerDNSAllowBrokenConfig 0|1 If this option is false, Tor exits immediately if there are problems parsing the system DNS configuration or connecting to nameservers. Otherwise, Tor continues to periodically retry the system nameservers until it eventually succeeds. (Default: 1) ServerDNSAllowNonRFC953Hostnames 0|1 When this option is disabled, Tor does not try to resolve hostnames containing illegal characters (like @ and :) rather than sending them to an exit node to be resolved. This helps trap accidental attempts to resolve URLs and so on. This option only affects name lookups that your server does on behalf of clients. (Default: 0) ServerDNSDetectHijacking 0|1 When this option is set to 1, we will test periodically to determine whether our local nameservers have been configured to hijack failing DNS requests (usually to an advertising site). If they are, we will attempt to correct this. This option only affects name lookups that your server does on behalf of clients. (Default: 1) ServerDNSRandomizeCase 0|1 When this option is set, Tor sets the case of each character randomly in outgoing DNS requests, and makes sure that the case matches in DNS replies. This so-called "0x20 hack" helps resist some types of DNS poisoning attack. For more information, see "Increased DNS Forgery Resistance through 0x20-Bit Encoding". This option only affects name lookups that your server does on behalf of clients. (Default: 1) ServerDNSResolvConfFile filename Overrides the default DNS configuration with the configuration in filename. The file format is the same as the standard Unix "resolv.conf" file (7). This option, like all other ServerDNS options, only affects name lookups that your server does on behalf of clients. (Defaults to use the system DNS configuration or a localhost DNS service in case no nameservers are found in a given configuration.) ServerDNSSearchDomains 0|1 If set to 1, then we will search for addresses in the local search domain. For example, if this system is configured to believe it is in "example.com", and a client tries to connect to "www", the client will be connected to "www.example.com". This option only affects name lookups that your server does on behalf of clients. (Default: 0) ServerDNSTestAddresses hostname,hostname,... When we’re detecting DNS hijacking, make sure that these valid addresses aren’t getting redirected. If they are, then our DNS is completely useless, and we’ll reset our exit policy to "reject *:*". This option only affects name lookups that your server does on behalf of clients. (Default: "www.google.com, www.mit.edu, www.yahoo.com, www.slashdot.org") ServerTransportListenAddr transport IP:PORT When this option is set, Tor will suggest IP:PORT as the listening address of any pluggable transport proxy that tries to launch transport. (IPv4 addresses should written as-is; IPv6 addresses should be wrapped in square brackets.) (Default: none) ServerTransportOptions transport k=v k=v ... When this option is set, Tor will pass the k=v parameters to any pluggable transport proxy that tries to launch transport. (Example: ServerTransportOptions obfs45 shared-secret=bridgepasswd cache=/var/lib/tor/cache) (Default: none) ServerTransportPlugin transport exec path-to-binary [options] The Tor relay launches the pluggable transport proxy in path-to-binary using options as its command-line options, and expects to receive proxied client traffic from it. (Default: none) ShutdownWaitLength NUM When we get a SIGINT and we’re a server, we begin shutting down: we close listeners and start refusing new circuits. After NUM seconds, we exit. If we get a second SIGINT, we exit immediately. (Default: 30 seconds) SigningKeyLifetime N days|weeks|months For how long should each Ed25519 signing key be valid? Tor uses a permanent master identity key that can be kept offline, and periodically generates new "signing" keys that it uses online. This option configures their lifetime. (Default: 30 days) SSLKeyLifetime N minutes|hours|days|weeks When creating a link certificate for our outermost SSL handshake, set its lifetime to this amount of time. If set to 0, Tor will choose some reasonable random defaults. (Default: 0) STATISTICS OPTIONS Relays publish most statistics in a document called the extra-info document. The following options affect the different types of statistics that Tor relays collect and publish: BridgeRecordUsageByCountry 0|1 When this option is enabled and BridgeRelay is also enabled, and we have GeoIP data, Tor keeps a per-country count of how many client addresses have contacted it so that it can help the bridge authority guess which countries have blocked access to it. If ExtraInfoStatistics is enabled, it will be published as part of the extra-info document. (Default: 1) CellStatistics 0|1 Relays only. When this option is enabled, Tor collects statistics about cell processing (i.e. mean time a cell is spending in a queue, mean number of cells in a queue and mean number of processed cells per circuit) and writes them into disk every 24 hours. Onion router operators may use the statistics for performance monitoring. If ExtraInfoStatistics is enabled, it will published as part of the extra-info document. (Default: 0) ConnDirectionStatistics 0|1 Relays only. When this option is enabled, Tor writes statistics on the amounts of traffic it passes between itself and other relays to disk every 24 hours. Enables relay operators to monitor how much their relay is being used as middle node in the circuit. If ExtraInfoStatistics is enabled, it will be published as part of the extra-info document. (Default: 0) DirReqStatistics 0|1 Relays and bridges only. When this option is enabled, a Tor directory writes statistics on the number and response time of network status requests to disk every 24 hours. Enables relay and bridge operators to monitor how much their server is being used by clients to learn about Tor network. If ExtraInfoStatistics is enabled, it will published as part of the extra-info document. (Default: 1) EntryStatistics 0|1 Relays only. When this option is enabled, Tor writes statistics on the number of directly connecting clients to disk every 24 hours. Enables relay operators to monitor how much inbound traffic that originates from Tor clients passes through their server to go further down the Tor network. If ExtraInfoStatistics is enabled, it will be published as part of the extra-info document. (Default: 0) ExitPortStatistics 0|1 Exit relays only. When this option is enabled, Tor writes statistics on the number of relayed bytes and opened stream per exit port to disk every 24 hours. Enables exit relay operators to measure and monitor amounts of traffic that leaves Tor network through their exit node. If ExtraInfoStatistics is enabled, it will be published as part of the extra-info document. (Default: 0) ExtraInfoStatistics 0|1 When this option is enabled, Tor includes previously gathered statistics in its extra-info documents that it uploads to the directory authorities. Disabling this option also removes bandwidth usage statistics, and GeoIPFile and GeoIPv6File hashes from the extra-info file. Bridge ServerTransportPlugin lines are always included in the extra-info file, because they are required by BridgeDB. (Default: 1) HiddenServiceStatistics 0|1 Relays and bridges only. When this option is enabled, a Tor relay writes obfuscated statistics on its role as hidden-service directory, introduction point, or rendezvous point to disk every 24 hours. If ExtraInfoStatistics is enabled, it will be published as part of the extra-info document. (Default: 1) OverloadStatistics 0|1* Relays and bridges only. When this option is enabled, a Tor relay will write an overload general line in the server descriptor if the relay is considered overloaded. (Default: 1) A relay is considered overloaded if at least one of these conditions is met: • Onionskins are starting to be dropped. • The OOM was invoked. • (Exit only) DNS timeout occurs X% of the time over Y seconds (values controlled by consensus parameters, see param-spec.txt). If ExtraInfoStatistics is enabled, it can also put two more specific overload lines in the extra-info document if at least one of these conditions is met: • TCP Port exhaustion. • Connection rate limits have been reached (read and write side). PaddingStatistics 0|1 Relays and bridges only. When this option is enabled, Tor collects statistics for padding cells sent and received by this relay, in addition to total cell counts. These statistics are rounded, and omitted if traffic is low. This information is important for load balancing decisions related to padding. If ExtraInfoStatistics is enabled, it will be published as a part of the extra-info document. (Default: 1) DIRECTORY SERVER OPTIONS The following options are useful only for directory servers. (Relays with enough bandwidth automatically become directory servers; see DirCache for details.) DirCache 0|1 When this option is set, Tor caches all current directory documents except extra info documents, and accepts client requests for them. If DownloadExtraInfo is set, cached extra info documents are also cached. Setting DirPort is not required for DirCache, because clients connect via the ORPort by default. Setting either DirPort or BridgeRelay and setting DirCache to 0 is not supported. (Default: 1) DirPolicy policy,policy,... Set an entrance policy for this server, to limit who can connect to the directory ports. The policies have the same form as exit policies above, except that port specifiers are ignored. Any address not matched by some entry in the policy is accepted. DirPort [address:]PORT|auto [flags] If this option is nonzero, advertise the directory service on this port. Set it to "auto" to have Tor pick a port for you. This option can occur more than once, but only one advertised DirPort is supported: all but one DirPort must have the NoAdvertise flag set. (Default: 0) The same flags are supported here as are supported by ORPort. This port can only be IPv4. As of Tor 0.4.6.1-alpha, non-authoritative relays (see AuthoritativeDirectory) will not publish the DirPort but will still listen on it. Clients don’t use the DirPorts on relays, so it is safe for you to remove the DirPort from your torrc configuration. DirPortFrontPage FILENAME When this option is set, it takes an HTML file and publishes it as "/" on the DirPort. Now relay operators can provide a disclaimer without needing to set up a separate webserver. There’s a sample disclaimer in contrib/operator-tools/tor-exit-notice.html. MaxConsensusAgeForDiffs N minutes|hours|days|weeks When this option is nonzero, Tor caches will not try to generate consensus diffs for any consensus older than this amount of time. If this option is set to zero, Tor will pick a reasonable default from the current networkstatus document. You should not set this option unless your cache is severely low on disk space or CPU. If you need to set it, keeping it above 3 or 4 hours will help clients much more than setting it to zero. (Default: 0) DENIAL OF SERVICE MITIGATION OPTIONS Tor has a series of built-in denial of service mitigation options that can be individually enabled/disabled and fine-tuned, but by default Tor directory authorities will define reasonable values for the network and no explicit configuration is required to make use of these protections. The following is a series of configuration options for relays and then options for onion services and how they work. The mitigations take place at relays, and are as follows: 1. If a single client address makes too many concurrent connections (this is configurable via DoSConnectionMaxConcurrentCount), hang up on further connections. 2. If a single client IP address (v4 or v6) makes circuits too quickly (default values are more than 3 per second, with an allowed burst of 90, see DoSCircuitCreationRate and DoSCircuitCreationBurst) while also having too many connections open (default is 3, see DoSCircuitCreationMinConnections), tor will refuse any new circuit (CREATE cells) for the next while (random value between 1 and 2 hours). 3. If a client asks to establish a rendezvous point to you directly (ex: Tor2Web client), ignore the request. These defenses can be manually controlled by torrc options, but relays will also take guidance from consensus parameters using these same names, so there’s no need to configure anything manually. In doubt, do not change those values. The values set by the consensus, if any, can be found here: https://consensus-health.torproject.org/#consensusparams If any of the DoS mitigations are enabled, a heartbeat message will appear in your log at NOTICE level which looks like: DoS mitigation since startup: 429042 circuits rejected, 17 marked addresses. 2238 connections closed. 8052 single hop clients refused. The following options are useful only for a public relay. They control the Denial of Service mitigation subsystem described above. DoSCircuitCreationEnabled 0|1|auto Enable circuit creation DoS mitigation. If set to 1 (enabled), tor will cache client IPs along with statistics in order to detect circuit DoS attacks. If an address is positively identified, tor will activate defenses against the address. See DoSCircuitCreationDefenseType option for more details. This is a client to relay detection only. "auto" means use the consensus parameter. If not defined in the consensus, the value is 0. (Default: auto) DoSCircuitCreationBurst NUM The allowed circuit creation burst per client IP address. If the circuit rate and the burst are reached, a client is marked as executing a circuit creation DoS. "0" means use the consensus parameter. If not defined in the consensus, the value is 90. (Default: 0) DoSCircuitCreationDefenseTimePeriod N seconds|minutes|hours The base time period in seconds that the DoS defense is activated for. The actual value is selected randomly for each activation from N+1 to 3/2 * N. "0" means use the consensus parameter. If not defined in the consensus, the value is 3600 seconds (1 hour). (Default: 0) DoSCircuitCreationDefenseType NUM This is the type of defense applied to a detected client address. The possible values are: 1: No defense. 2: Refuse circuit creation for the DoSCircuitCreationDefenseTimePeriod period of time. "0" means use the consensus parameter. If not defined in the consensus, the value is 2. (Default: 0) DoSCircuitCreationMinConnections NUM Minimum threshold of concurrent connections before a client address can be flagged as executing a circuit creation DoS. In other words, once a client address reaches the circuit rate and has a minimum of NUM concurrent connections, a detection is positive. "0" means use the consensus parameter. If not defined in the consensus, the value is 3. (Default: 0) DoSCircuitCreationRate NUM The allowed circuit creation rate per second applied per client IP address. If this option is 0, it obeys a consensus parameter. If not defined in the consensus, the value is 3. (Default: 0) DoSConnectionEnabled 0|1|auto Enable the connection DoS mitigation. If set to 1 (enabled), for client address only, this allows tor to mitigate against large number of concurrent connections made by a single IP address. "auto" means use the consensus parameter. If not defined in the consensus, the value is 0. (Default: auto) DoSConnectionDefenseType NUM This is the type of defense applied to a detected client address for the connection mitigation. The possible values are: 1: No defense. 2: Immediately close new connections. "0" means use the consensus parameter. If not defined in the consensus, the value is 2. (Default: 0) DoSConnectionMaxConcurrentCount NUM The maximum threshold of concurrent connection from a client IP address. Above this limit, a defense selected by DoSConnectionDefenseType is applied. "0" means use the consensus parameter. If not defined in the consensus, the value is 100. (Default: 0) DoSConnectionConnectRate NUM The allowed rate of client connection from a single address per second. Coupled with the burst (see below), if the limit is reached, the address is marked and a defense is applied (DoSConnectionDefenseType) for a period of time defined by DoSConnectionConnectDefenseTimePeriod. If not defined or set to 0, it is controlled by a consensus parameter. (Default: 0) DoSConnectionConnectBurst NUM The allowed burst of client connection from a single address per second. See the DoSConnectionConnectRate for more details on this detection. If not defined or set to 0, it is controlled by a consensus parameter. (Default: 0) DoSConnectionConnectDefenseTimePeriod N seconds|minutes|hours The base time period in seconds that the client connection defense is activated for. The actual value is selected randomly for each activation from N+1 to 3/2 * N. If not defined or set to 0, it is controlled by a consensus parameter. (Default: 24 hours) DoSRefuseSingleHopClientRendezvous 0|1|auto Refuse establishment of rendezvous points for single hop clients. In other words, if a client directly connects to the relay and sends an ESTABLISH_RENDEZVOUS cell, it is silently dropped. "auto" means use the consensus parameter. If not defined in the consensus, the value is 0. (Default: auto) For onion services, mitigations are a work in progress and multiple options are currently available. The introduction point defense is a rate limit on the number of introduction requests that will be forwarded to a service by each of its honest introduction point routers. This can prevent some types of overwhelming floods from reaching the service, but it will also prevent legitimate clients from establishing new connections. The following options are per onion service: HiddenServiceEnableIntroDoSDefense 0|1 Enable DoS defense at the intropoint level. When this is enabled, the rate and burst parameter (see below) will be sent to the intro point which will then use them to apply rate limiting for introduction request to this service. The introduction point honors the consensus parameters except if this is specifically set by the service operator using this option. The service never looks at the consensus parameters in order to enable or disable this defense. (Default: 0) HiddenServiceEnableIntroDoSBurstPerSec NUM The allowed client introduction burst per second at the introduction point. If this option is 0, it is considered infinite and thus if HiddenServiceEnableIntroDoSDefense is set, it then effectively disables the defenses. (Default: 200) HiddenServiceEnableIntroDoSRatePerSec NUM The allowed client introduction rate per second at the introduction point. If this option is 0, it is considered infinite and thus if HiddenServiceEnableIntroDoSDefense is set, it then effectively disables the defenses. (Default: 25) The rate is the maximum number of clients a service will ask its introduction points to allow every seconds. And the burst is a parameter that allows that many within one second. For example, the default values of 25 and 200 respectively means that for every introduction points a service has (default 3 but can be configured with HiddenServiceNumIntroductionPoints), 25 clients per seconds will be allowed to reach the service and 200 at most within 1 second as a burst. This means that if 200 clients are seen within 1 second, it will take 8 seconds (200/25) for another client to be able to be allowed to introduce due to the rate of 25 per second. This might be too much for your use case or not, fine tuning these values is hard and are likely different for each service operator. Why is this not helping reachability of the service? Because the defenses are at the introduction point, an attacker can easily flood all introduction point rendering the service unavailable due to no client being able to pass through. But, the service itself is not overwhelmed with connetions allowing it to function properly for the few clients that were able to go through or other any services running on the same tor instance. The bottom line is that this protects the network by preventing an onion service to flood the network with new rendezvous circuits that is reducing load on the network. A secondary mitigation is available, based on prioritized dispatch of rendezvous circuits for new connections. The queue is ordered based on effort a client chooses to spend at computing a proof-of-work function. The following options are per onion service: HiddenServicePoWDefensesEnabled 0|1 Enable proof-of-work based service DoS mitigation. If set to 1 (enabled), tor will include parameters for an optional client puzzle in the encrypted portion of this hidden service’s descriptor. Incoming rendezvous requests will be prioritized based on the amount of effort a client chooses to make when computing a solution to the puzzle. The service will periodically update a suggested amount of effort, based on attack load, and disable the puzzle entirely when the service is not overloaded. (Default: 0) HiddenServicePoWQueueRate NUM The sustained rate of rendezvous requests to dispatch per second from the priority queue. Has no effect when proof-of-work is disabled. If this is set to 0 there’s no explicit limit and we will process requests as quickly as possible. (Default: 250) HiddenServicePoWQueueBurst NUM The maximum burst size for rendezvous requests handled from the priority queue at once. (Default: 2500) These options are applicable to both onion services and their clients: CompiledProofOfWorkHash 0|1|auto When proof-of-work DoS mitigation is active, both the services themselves and the clients which connect will use a dynamically generated hash function as part of the puzzle computation. If this option is set to 1, puzzles will only be solved and verified using the compiled implementation (about 20x faster) and we choose to fail rather than using a slower fallback. If it’s 0, the compiler will never be used. By default, the compiler is always tried if possible but the interpreter is available as a fallback. (Default: auto) See also --list-modules, these proof of work options have no effect unless the "pow" module is enabled at compile time. DIRECTORY AUTHORITY SERVER OPTIONS The following options enable operation as a directory authority, and control how Tor behaves as a directory authority. You should not need to adjust any of them if you’re running a regular relay or exit server on the public Tor network. AuthoritativeDirectory 0|1 When this option is set to 1, Tor operates as an authoritative directory server. Instead of caching the directory, it generates its own list of good servers, signs it, and sends that to the clients. Unless the clients already have you listed as a trusted directory, you probably do not want to set this option. BridgeAuthoritativeDir 0|1 When this option is set in addition to AuthoritativeDirectory, Tor accepts and serves server descriptors, but it caches and serves the main networkstatus documents rather than generating its own. (Default: 0) V3AuthoritativeDirectory 0|1 When this option is set in addition to AuthoritativeDirectory, Tor generates version 3 network statuses and serves descriptors, etc as described in dir-spec.txt file of torspec (for Tor clients and servers running at least 0.2.0.x). AuthDirBadExit AddressPattern... Authoritative directories only. A set of address patterns for servers that will be listed as bad exits in any network status document this authority publishes, if AuthDirListBadExits is set. (The address pattern syntax here and in the options below is the same as for exit policies, except that you don’t need to say "accept" or "reject", and ports are not needed.) AuthDirMiddleOnly AddressPattern... Authoritative directories only. A set of address patterns for servers that will be listed as middle-only in any network status document this authority publishes, if AuthDirListMiddleOnly is set. AuthDirFastGuarantee N bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits Authoritative directories only. If non-zero, always vote the Fast flag for any relay advertising this amount of capacity or more. (Default: 100 KBytes) AuthDirGuardBWGuarantee N bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits Authoritative directories only. If non-zero, this advertised capacity or more is always sufficient to satisfy the bandwidth requirement for the Guard flag. (Default: 2 MBytes) AuthDirHasIPv6Connectivity 0|1 Authoritative directories only. When set to 0, OR ports with an IPv6 address are not included in the authority’s votes. When set to 1, IPv6 OR ports are tested for reachability like IPv4 OR ports. If the reachability test succeeds, the authority votes for the IPv6 ORPort, and votes Running for the relay. If the reachability test fails, the authority does not vote for the IPv6 ORPort, and does not vote Running (Default: 0) The content of the consensus depends on the number of voting authorities that set AuthDirHasIPv6Connectivity: If no authorities set AuthDirHasIPv6Connectivity 1, there will be no IPv6 ORPorts in the consensus. If a minority of authorities set AuthDirHasIPv6Connectivity 1, unreachable IPv6 ORPorts will be removed from the consensus. But the majority of IPv4-only authorities will still vote the relay as Running. Reachable IPv6 ORPort lines will be included in the consensus If a majority of voting authorities set AuthDirHasIPv6Connectivity 1, relays with unreachable IPv6 ORPorts will not be listed as Running. Reachable IPv6 ORPort lines will be included in the consensus (To ensure that any valid majority will vote relays with unreachable IPv6 ORPorts not Running, 75% of authorities must set AuthDirHasIPv6Connectivity 1.) AuthDirInvalid AddressPattern... Authoritative directories only. A set of address patterns for servers that will never be listed as "valid" in any network status document that this authority publishes. AuthDirListBadExits 0|1 Authoritative directories only. If set to 1, this directory has some opinion about which nodes are unsuitable as exit nodes. (Do not set this to 1 unless you plan to list non-functioning exits as bad; otherwise, you are effectively voting in favor of every declared exit as an exit.) AuthDirListMiddleOnly 0|1 Authoritative directories only. If set to 1, this directory has some opinion about which nodes should only be used in the middle position. (Do not set this to 1 unless you plan to list questionable relays as "middle only"; otherwise, you are effectively voting against middle-only status for every relay.) AuthDirMaxServersPerAddr NUM Authoritative directories only. The maximum number of servers that we will list as acceptable on a single IP address. Set this to "0" for "no limit". (Default: 2) AuthDirPinKeys 0|1 Authoritative directories only. If non-zero, do not allow any relay to publish a descriptor if any other relay has reserved its <Ed25519,RSA> identity keypair. In all cases, Tor records every keypair it accepts in a journal if it is new, or if it differs from the most recently accepted pinning for one of the keys it contains. (Default: 1) AuthDirReject AddressPattern... Authoritative directories only. A set of address patterns for servers that will never be listed at all in any network status document that this authority publishes, or accepted as an OR address in any descriptor submitted for publication by this authority. AuthDirRejectRequestsUnderLoad 0|1 If set, the directory authority will start rejecting directory requests from non relay connections by sending a 503 error code if it is under bandwidth pressure (reaching the configured limit if any). Relays will always tried to be answered even if this is on. (Default: 1) AuthDirBadExitCCs CC,... AuthDirInvalidCCs CC,... AuthDirMiddleOnlyCCs CC,... AuthDirRejectCCs CC,... Authoritative directories only. These options contain a comma-separated list of country codes such that any server in one of those country codes will be marked as a bad exit/invalid for use, or rejected entirely. AuthDirSharedRandomness 0|1 Authoritative directories only. Switch for the shared random protocol. If zero, the authority won’t participate in the protocol. If non-zero (default), the flag "shared-rand-participate" is added to the authority vote indicating participation in the protocol. (Default: 1) AuthDirTestEd25519LinkKeys 0|1 Authoritative directories only. If this option is set to 0, then we treat relays as "Running" if their RSA key is correct when we probe them, regardless of their Ed25519 key. We should only ever set this option to 0 if there is some major bug in Ed25519 link authentication that causes us to label all the relays as not Running. (Default: 1) AuthDirTestReachability 0|1 Authoritative directories only. If set to 1, then we periodically check every relay we know about to see whether it is running. If set to 0, we vote Running for every relay, and don’t perform these tests. (Default: 1) AuthDirVoteGuard node,node,... A list of identity fingerprints or country codes or address patterns of nodes to vote Guard for regardless of their uptime and bandwidth. See ExcludeNodes for more information on how to specify nodes. AuthDirVoteGuardBwThresholdFraction FRACTION The Guard flag bandwidth performance threshold fraction that is the fraction representing who gets the Guard flag out of all measured bandwidth. (Default: 0.75) AuthDirVoteGuardGuaranteeTimeKnown N seconds|minutes|hours|days|weeks A relay with at least this much weighted time known can be considered familiar enough to be a guard. (Default: 8 days) AuthDirVoteGuardGuaranteeWFU FRACTION A level of weighted fractional uptime (WFU) is that is sufficient to be a Guard. (Default: 0.98) AuthDirVoteStableGuaranteeMinUptime N seconds|minutes|hours|days|weeks If a relay’s uptime is at least this value, then it is always considered stable, regardless of the rest of the network. (Default: 30 days) AuthDirVoteStableGuaranteeMTBF N seconds|minutes|hours|days|weeks If a relay’s mean time between failures (MTBF) is least this value, then it will always be considered stable. (Default: 5 days) BridgePassword Password If set, contains an HTTP authenticator that tells a bridge authority to serve all requested bridge information. Used by the (only partially implemented) "bridge community" design, where a community of bridge relay operators all use an alternate bridge directory authority, and their target user audience can periodically fetch the list of available community bridges to stay up-to-date. (Default: not set) ConsensusParams STRING STRING is a space-separated list of key=value pairs that Tor will include in the "params" line of its networkstatus vote. This directive can be specified multiple times so you don’t have to put it all on one line. DirAllowPrivateAddresses 0|1 If set to 1, Tor will accept server descriptors with arbitrary "Address" elements. Otherwise, if the address is not an IP address or is a private IP address, it will reject the server descriptor. Additionally, Tor will allow exit policies for private networks to fulfill Exit flag requirements. (Default: 0) GuardfractionFile FILENAME V3 authoritative directories only. Configures the location of the guardfraction file which contains information about how long relays have been guards. (Default: unset) MinMeasuredBWsForAuthToIgnoreAdvertised N A total value, in abstract bandwidth units, describing how much measured total bandwidth an authority should have observed on the network before it will treat advertised bandwidths as wholly unreliable. (Default: 500) MinUptimeHidServDirectoryV2 N seconds|minutes|hours|days|weeks Minimum uptime of a relay to be accepted as a hidden service directory by directory authorities. (Default: 96 hours) RecommendedClientVersions STRING STRING is a comma-separated list of Tor versions currently believed to be safe for clients to use. This information is included in version 2 directories. If this is not set then the value of RecommendedVersions is used. When this is set then VersioningAuthoritativeDirectory should be set too. RecommendedServerVersions STRING STRING is a comma-separated list of Tor versions currently believed to be safe for servers to use. This information is included in version 2 directories. If this is not set then the value of RecommendedVersions is used. When this is set then VersioningAuthoritativeDirectory should be set too. RecommendedVersions STRING STRING is a comma-separated list of Tor versions currently believed to be safe. The list is included in each directory, and nodes which pull down the directory learn whether they need to upgrade. This option can appear multiple times: the values from multiple lines are spliced together. When this is set then VersioningAuthoritativeDirectory should be set too. V3AuthDistDelay N seconds|minutes|hours V3 authoritative directories only. Configures the server’s preferred delay between publishing its consensus and signature and assuming it has all the signatures from all the other authorities. Note that the actual time used is not the server’s preferred time, but the consensus of all preferences. (Default: 5 minutes) V3AuthNIntervalsValid NUM V3 authoritative directories only. Configures the number of VotingIntervals for which each consensus should be valid for. Choosing high numbers increases network partitioning risks; choosing low numbers increases directory traffic. Note that the actual number of intervals used is not the server’s preferred number, but the consensus of all preferences. Must be at least 2. (Default: 3) V3AuthUseLegacyKey 0|1 If set, the directory authority will sign consensuses not only with its own signing key, but also with a "legacy" key and certificate with a different identity. This feature is used to migrate directory authority keys in the event of a compromise. (Default: 0) V3AuthVoteDelay N seconds|minutes|hours V3 authoritative directories only. Configures the server’s preferred delay between publishing its vote and assuming it has all the votes from all the other authorities. Note that the actual time used is not the server’s preferred time, but the consensus of all preferences. (Default: 5 minutes) V3AuthVotingInterval N minutes|hours V3 authoritative directories only. Configures the server’s preferred voting interval. Note that voting will actually happen at an interval chosen by consensus from all the authorities' preferred intervals. This time SHOULD divide evenly into a day. (Default: 1 hour) V3BandwidthsFile FILENAME V3 authoritative directories only. Configures the location of the bandwidth-authority generated file storing information on relays' measured bandwidth capacities. To avoid inconsistent reads, bandwidth data should be written to temporary file, then renamed to the configured filename. (Default: unset) VersioningAuthoritativeDirectory 0|1 When this option is set to 1, Tor adds information on which versions of Tor are still believed safe for use to the published directory. Each version 1 authority is automatically a versioning authority; version 2 authorities provide this service optionally. See RecommendedVersions, RecommendedClientVersions, and RecommendedServerVersions. HIDDEN SERVICE OPTIONS The following options are used to configure a hidden service. Some options apply per service and some apply for the whole tor instance. The next section describes the per service options that can only be set after the HiddenServiceDir directive PER SERVICE OPTIONS: HiddenServiceAllowUnknownPorts 0|1 If set to 1, then connections to unrecognized ports do not cause the current hidden service to close rendezvous circuits. (Setting this to 0 is not an authorization mechanism; it is instead meant to be a mild inconvenience to port-scanners.) (Default: 0) HiddenServiceDir DIRECTORY Store data files for a hidden service in DIRECTORY. Every hidden service must have a separate directory. You may use this option multiple times to specify multiple services. If DIRECTORY does not exist, Tor will create it. Please note that you cannot add new Onion Service to already running Tor instance if Sandbox is enabled. (Note: in current versions of Tor, if DIRECTORY is a relative path, it will be relative to the current working directory of Tor instance, not to its DataDirectory. Do not rely on this behavior; it is not guaranteed to remain the same in future versions.) HiddenServiceDirGroupReadable 0|1 If this option is set to 1, allow the filesystem group to read the hidden service directory and hostname file. If the option is set to 0, only owner is able to read the hidden service directory. (Default: 0) Has no effect on Windows. HiddenServiceExportCircuitID protocol The onion service will use the given protocol to expose the global circuit identifier of each inbound client circuit. The only protocol supported right now 'haproxy'. This option is only for v3 services. (Default: none) The haproxy option works in the following way: when the feature is enabled, the Tor process will write a header line when a client is connecting to the onion service. The header will look like this: "PROXY TCP6 fc00:dead:beef:4dad::ffff:ffff ::1 65535 42\r\n" We encode the "global circuit identifier" as the last 32-bits of the first IPv6 address. All other values in the header can safely be ignored. You can compute the global circuit identifier using the following formula given the IPv6 address "fc00:dead:beef:4dad::AABB:CCDD": global_circuit_id = (0xAA << 24) + (0xBB << 16) + (0xCC << 8) + 0xDD; In the case above, where the last 32-bits are 0xffffffff, the global circuit identifier would be 4294967295. You can use this value together with Tor’s control port to terminate particular circuits using their global circuit identifiers. For more information about this see control-spec.txt. The HAProxy version 1 protocol is described in detail at https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt HiddenServiceOnionBalanceInstance 0|1 If set to 1, this onion service becomes an OnionBalance instance and will accept client connections destined to an OnionBalance frontend. In this case, Tor expects to find a file named "ob_config" inside the HiddenServiceDir directory with content: MasterOnionAddress <frontend_onion_address> where <frontend_onion_address> is the onion address of the OnionBalance frontend (e.g. wrxdvcaqpuzakbfww5sxs6r2uybczwijzfn2ezy2osaj7iox7kl7nhad.onion). HiddenServiceMaxStreams N The maximum number of simultaneous streams (connections) per rendezvous circuit. The maximum value allowed is 65535. (Setting this to 0 will allow an unlimited number of simultaneous streams.) (Default: 0) HiddenServiceMaxStreamsCloseCircuit 0|1 If set to 1, then exceeding HiddenServiceMaxStreams will cause the offending rendezvous circuit to be torn down, as opposed to stream creation requests that exceed the limit being silently ignored. (Default: 0) HiddenServiceNumIntroductionPoints NUM Number of introduction points the hidden service will have. You can’t have more than 20. (Default: 3) HiddenServicePort VIRTPORT [TARGET] Configure a virtual port VIRTPORT for a hidden service. You may use this option multiple times; each time applies to the service using the most recent HiddenServiceDir. By default, this option maps the virtual port to the same port on 127.0.0.1 over TCP. You may override the target port, address, or both by specifying a target of addr, port, addr:port, or unix:path. (You can specify an IPv6 target as [addr]:port. Unix paths may be quoted, and may use standard C escapes.) You may also have multiple lines with the same VIRTPORT: when a user connects to that VIRTPORT, one of the TARGETs from those lines will be chosen at random. Note that address-port pairs have to be comma-separated. HiddenServiceVersion 3 A list of rendezvous service descriptor versions to publish for the hidden service. Currently, only version 3 is supported. (Default: 3) PER INSTANCE OPTIONS: HiddenServiceSingleHopMode 0|1 Experimental - Non Anonymous Hidden Services on a tor instance in HiddenServiceSingleHopMode make one-hop (direct) circuits between the onion service server, and the introduction and rendezvous points. (Onion service descriptors are still posted using 3-hop paths, to avoid onion service directories blocking the service.) This option makes every hidden service instance hosted by a tor instance a Single Onion Service. One-hop circuits make Single Onion servers easily locatable, but clients remain location-anonymous. However, the fact that a client is accessing a Single Onion rather than a Hidden Service may be statistically distinguishable. WARNING: Once a hidden service directory has been used by a tor instance in HiddenServiceSingleHopMode, it can NEVER be used again for a hidden service. It is best practice to create a new hidden service directory, key, and address for each new Single Onion Service and Hidden Service. It is not possible to run Single Onion Services and Hidden Services from the same tor instance: they should be run on different servers with different IP addresses. HiddenServiceSingleHopMode requires HiddenServiceNonAnonymousMode to be set to 1. Since a Single Onion service is non-anonymous, you can not configure a SOCKSPort on a tor instance that is running in HiddenServiceSingleHopMode. Can not be changed while tor is running. (Default: 0) HiddenServiceNonAnonymousMode 0|1 Makes hidden services non-anonymous on this tor instance. Allows the non-anonymous HiddenServiceSingleHopMode. Enables direct connections in the server-side hidden service protocol. If you are using this option, you need to disable all client-side services on your Tor instance, including setting SOCKSPort to "0". Can not be changed while tor is running. (Default: 0) PublishHidServDescriptors 0|1 If set to 0, Tor will run any hidden services you configure, but it won’t advertise them to the rendezvous directory. This option is only useful if you’re using a Tor controller that handles hidserv publishing for you. (Default: 1) CLIENT AUTHORIZATION Service side: To configure client authorization on the service side, the "<HiddenServiceDir>/authorized_clients/" directory needs to exist. Each file in that directory should be suffixed with ".auth" (i.e. "alice.auth"; the file name is irrelevant) and its content format MUST be: <auth-type>:<key-type>:<base32-encoded-public-key> The supported <auth-type> are: "descriptor". The supported <key-type> are: "x25519". The <base32-encoded-public-key> is the base32 representation of the raw key bytes only (32 bytes for x25519). Each file MUST contain one line only. Any malformed file will be ignored. Client authorization will only be enabled for the service if tor successfully loads at least one authorization file. Note that once you've configured client authorization, anyone else with the address won't be able to access it from this point on. If no authorization is configured, the service will be accessible to anyone with the onion address. Revoking a client can be done by removing their ".auth" file, however the revocation will be in effect only after the tor process gets restarted or if a SIGHUP takes place. Client side: To access a v3 onion service with client authorization as a client, make sure you have ClientOnionAuthDir set in your torrc. Then, in the <ClientOnionAuthDir> directory, create an .auth_private file for the onion service corresponding to this key (i.e. 'bob_onion.auth_private'). The contents of the <ClientOnionAuthDir>/<user>.auth_private file should look like: <56-char-onion-addr-without-.onion-part>:descriptor:x25519:<x25519 private key in base32> For more information, please see https://2019.www.torproject.org/docs/tor-onion-service.html.en#ClientAuthorization . TESTING NETWORK OPTIONS The following options are used for running a testing Tor network. TestingTorNetwork 0|1 If set to 1, Tor adjusts default values of the configuration options below, so that it is easier to set up a testing Tor network. May only be set if non-default set of DirAuthorities is set. Cannot be unset while Tor is running. (Default: 0) DirAllowPrivateAddresses 1 EnforceDistinctSubnets 0 AuthDirMaxServersPerAddr 0 ClientBootstrapConsensusAuthorityDownloadInitialDelay 0 ClientBootstrapConsensusFallbackDownloadInitialDelay 0 ClientBootstrapConsensusAuthorityOnlyDownloadInitialDelay 0 ClientDNSRejectInternalAddresses 0 ClientRejectInternalAddresses 0 CountPrivateBandwidth 1 ExitPolicyRejectPrivate 0 ExtendAllowPrivateAddresses 1 V3AuthVotingInterval 5 minutes V3AuthVoteDelay 20 seconds V3AuthDistDelay 20 seconds TestingV3AuthInitialVotingInterval 150 seconds TestingV3AuthInitialVoteDelay 20 seconds TestingV3AuthInitialDistDelay 20 seconds TestingAuthDirTimeToLearnReachability 0 minutes MinUptimeHidServDirectoryV2 0 minutes TestingServerDownloadInitialDelay 0 TestingClientDownloadInitialDelay 0 TestingServerConsensusDownloadInitialDelay 0 TestingClientConsensusDownloadInitialDelay 0 TestingBridgeDownloadInitialDelay 10 TestingBridgeBootstrapDownloadInitialDelay 0 TestingClientMaxIntervalWithoutRequest 5 seconds TestingDirConnectionMaxStall 30 seconds TestingEnableConnBwEvent 1 TestingEnableCellStatsEvent 1 TestingAuthDirTimeToLearnReachability N seconds|minutes|hours After starting as an authority, do not make claims about whether routers are Running until this much time has passed. Changing this requires that TestingTorNetwork is set. (Default: 30 minutes) TestingAuthKeyLifetime N seconds|minutes|hours|days|weeks|months Overrides the default lifetime for a signing Ed25519 TLS Link authentication key. (Default: 2 days) TestingAuthKeySlop N seconds|minutes|hours TestingBridgeBootstrapDownloadInitialDelay N Initial delay in seconds for how long clients should wait before downloading a bridge descriptor for a new bridge. Changing this requires that TestingTorNetwork is set. (Default: 0) TestingBridgeDownloadInitialDelay N How long to wait (in seconds) once clients have successfully downloaded a bridge descriptor, before trying another download for that same bridge. Changing this requires that TestingTorNetwork is set. (Default: 10800) TestingClientConsensusDownloadInitialDelay N Initial delay in seconds for when clients should download consensuses. Changing this requires that TestingTorNetwork is set. (Default: 0) TestingClientDownloadInitialDelay N Initial delay in seconds for when clients should download things in general. Changing this requires that TestingTorNetwork is set. (Default: 0) TestingClientMaxIntervalWithoutRequest N seconds|minutes When directory clients have only a few descriptors to request, they batch them until they have more, or until this amount of time has passed. Changing this requires that TestingTorNetwork is set. (Default: 10 minutes) TestingDirAuthVoteExit node,node,... A list of identity fingerprints, country codes, and address patterns of nodes to vote Exit for regardless of their uptime, bandwidth, or exit policy. See ExcludeNodes for more information on how to specify nodes. In order for this option to have any effect, TestingTorNetwork has to be set. See ExcludeNodes for more information on how to specify nodes. TestingDirAuthVoteExitIsStrict 0|1 If True (1), a node will never receive the Exit flag unless it is specified in the TestingDirAuthVoteExit list, regardless of its uptime, bandwidth, or exit policy. In order for this option to have any effect, TestingTorNetwork has to be set. TestingDirAuthVoteGuard node,node,... A list of identity fingerprints and country codes and address patterns of nodes to vote Guard for regardless of their uptime and bandwidth. See ExcludeNodes for more information on how to specify nodes. In order for this option to have any effect, TestingTorNetwork has to be set. TestingDirAuthVoteGuardIsStrict 0|1 If True (1), a node will never receive the Guard flag unless it is specified in the TestingDirAuthVoteGuard list, regardless of its uptime and bandwidth. In order for this option to have any effect, TestingTorNetwork has to be set. TestingDirAuthVoteHSDir node,node,... A list of identity fingerprints and country codes and address patterns of nodes to vote HSDir for regardless of their uptime and DirPort. See ExcludeNodes for more information on how to specify nodes. In order for this option to have any effect, TestingTorNetwork must be set. TestingDirAuthVoteHSDirIsStrict 0|1 If True (1), a node will never receive the HSDir flag unless it is specified in the TestingDirAuthVoteHSDir list, regardless of its uptime and DirPort. In order for this option to have any effect, TestingTorNetwork has to be set. TestingDirConnectionMaxStall N seconds|minutes Let a directory connection stall this long before expiring it. Changing this requires that TestingTorNetwork is set. (Default: 5 minutes) TestingEnableCellStatsEvent 0|1 If this option is set, then Tor controllers may register for CELL_STATS events. Changing this requires that TestingTorNetwork is set. (Default: 0) TestingEnableConnBwEvent 0|1 If this option is set, then Tor controllers may register for CONN_BW events. Changing this requires that TestingTorNetwork is set. (Default: 0) TestingLinkCertLifetime N seconds|minutes|hours|days|weeks|months Overrides the default lifetime for the certificates used to authenticate our X509 link cert with our ed25519 signing key. (Default: 2 days) TestingLinkKeySlop N seconds|minutes|hours TestingMinExitFlagThreshold N KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits Sets a lower-bound for assigning an exit flag when running as an authority on a testing network. Overrides the usual default lower bound of 4 KBytes. (Default: 0) TestingMinFastFlagThreshold N bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits Minimum value for the Fast flag. Overrides the ordinary minimum taken from the consensus when TestingTorNetwork is set. (Default: 0.) TestingMinTimeToReportBandwidth N seconds|minutes|hours Do not report our measurements for our maximum observed bandwidth for any time period that has lasted for less than this amount of time. Values over 1 day have no effect. (Default: 1 day) TestingServerConsensusDownloadInitialDelay N Initial delay in seconds for when servers should download consensuses. Changing this requires that TestingTorNetwork is set. (Default: 0) TestingServerDownloadInitialDelay N Initial delay in seconds for when servers should download things in general. Changing this requires that TestingTorNetwork is set. (Default: 0) TestingSigningKeySlop N seconds|minutes|hours How early before the official expiration of a an Ed25519 signing key do we replace it and issue a new key? (Default: 3 hours for link and auth; 1 day for signing.) TestingV3AuthInitialDistDelay N seconds|minutes|hours Like V3AuthDistDelay, but for initial voting interval before the first consensus has been created. Changing this requires that TestingTorNetwork is set. (Default: 5 minutes) TestingV3AuthInitialVoteDelay N seconds|minutes|hours Like V3AuthVoteDelay, but for initial voting interval before the first consensus has been created. Changing this requires that TestingTorNetwork is set. (Default: 5 minutes) TestingV3AuthInitialVotingInterval N seconds|minutes|hours Like V3AuthVotingInterval, but for initial voting interval before the first consensus has been created. Changing this requires that TestingTorNetwork is set. (Default: 30 minutes) TestingV3AuthVotingStartOffset N seconds|minutes|hours Directory authorities offset voting start time by this much. Changing this requires that TestingTorNetwork is set. (Default: 0) NON-PERSISTENT OPTIONS These options are not saved to the torrc file by the "SAVECONF" controller command. Other options of this type are documented in control-spec.txt, section 5.4. End-users should mostly ignore them. __ControlPort, __DirPort, __DNSPort, __ExtORPort, __NATDPort, __ORPort, __SocksPort, __TransPort These underscore-prefixed options are variants of the regular Port options. They behave the same, except they are not saved to the torrc file by the controller’s SAVECONF command. SIGNALS Tor catches the following signals: SIGTERM Tor will catch this, clean up and sync to disk if necessary, and exit. SIGINT Tor clients behave as with SIGTERM; but Tor servers will do a controlled slow shutdown, closing listeners and waiting 30 seconds before exiting. (The delay can be configured with the ShutdownWaitLength config option.) SIGHUP The signal instructs Tor to reload its configuration (including closing and reopening logs), and kill and restart its helper processes if applicable. SIGUSR1 Log statistics about current connections, past connections, and throughput. SIGUSR2 Switch all logs to loglevel debug. You can go back to the old loglevels by sending a SIGHUP. SIGCHLD Tor receives this signal when one of its helper processes has exited, so it can clean up. SIGPIPE Tor catches this signal and ignores it. SIGXFSZ If this signal exists on your platform, Tor catches and ignores it. FILES /opt/homebrew/etc/tor/torrc Default location of the configuration file. $HOME/.torrc Fallback location for torrc, if /opt/homebrew/etc/tor/torrc is not found. /opt/homebrew/var/lib/tor/ The tor process stores keys and other data here. CacheDirectory/cached-certs Contains downloaded directory key certificates that are used to verify authenticity of documents generated by the Tor directory authorities. CacheDirectory/cached-consensus and/or cached-microdesc-consensus The most recent consensus network status document we’ve downloaded. CacheDirectory/cached-descriptors and cached-descriptors.new These files contain the downloaded router statuses. Some routers may appear more than once; if so, the most recently published descriptor is used. Lines beginning with @-signs are annotations that contain more information about a given router. The .new file is an append-only journal; when it gets too large, all entries are merged into a new cached-descriptors file. CacheDirectory/cached-extrainfo and cached-extrainfo.new Similar to cached-descriptors, but holds optionally-downloaded "extra-info" documents. Relays use these documents to send inessential information about statistics, bandwidth history, and network health to the authorities. They aren’t fetched by default. See DownloadExtraInfo for more information. CacheDirectory/cached-microdescs and cached-microdescs.new These files hold downloaded microdescriptors. Lines beginning with @-signs are annotations that contain more information about a given router. The .new file is an append-only journal; when it gets too large, all entries are merged into a new cached-microdescs file. DataDirectory/state Contains a set of persistent key-value mappings. These include: • the current entry guards and their status. • the current bandwidth accounting values. • when the file was last written • what version of Tor generated the state file • a short history of bandwidth usage, as produced in the server descriptors. DataDirectory/sr-state Authority only. This file is used to record information about the current status of the shared-random-value voting state. CacheDirectory/diff-cache Directory cache only. Holds older consensuses and diffs from oldest to the most recent consensus of each type compressed in various ways. Each file contains a set of key-value arguments describing its contents, followed by a single NUL byte, followed by the main file contents. DataDirectory/bw_accounting This file is obsolete and the data is now stored in the state file instead. Used to track bandwidth accounting values (when the current period starts and ends; how much has been read and written so far this period). DataDirectory/control_auth_cookie This file can be used only when cookie authentication is enabled. Used for cookie authentication with the controller. Location can be overridden by the CookieAuthFile configuration option. Regenerated on startup. See control-spec.txt in torspec for details. DataDirectory/lock This file is used to prevent two Tor instances from using the same data directory. If access to this file is locked, data directory is already in use by Tor. DataDirectory/key-pinning-journal Used by authorities. A line-based file that records mappings between RSA1024 and Ed25519 identity keys. Authorities enforce these mappings, so that once a relay has picked an Ed25519 key, stealing or factoring the RSA1024 key will no longer let an attacker impersonate the relay. KeyDirectory/authority_identity_key A v3 directory authority’s master identity key, used to authenticate its signing key. Tor doesn’t use this while it’s running. The tor-gencert program uses this. If you’re running an authority, you should keep this key offline, and not put it in this file. KeyDirectory/authority_certificate Only directory authorities use this file. A v3 directory authority’s certificate which authenticates the authority’s current vote- and consensus-signing key using its master identity key. KeyDirectory/authority_signing_key Only directory authorities use this file. A v3 directory authority’s signing key that is used to sign votes and consensuses. Corresponds to the authority_certificate cert. KeyDirectory/legacy_certificate As authority_certificate; used only when V3AuthUseLegacyKey is set. See documentation for V3AuthUseLegacyKey. KeyDirectory/legacy_signing_key As authority_signing_key: used only when V3AuthUseLegacyKey is set. See documentation for V3AuthUseLegacyKey. KeyDirectory/secret_id_key A relay’s RSA1024 permanent identity key, including private and public components. Used to sign router descriptors, and to sign other keys. KeyDirectory/ed25519_master_id_public_key The public part of a relay’s Ed25519 permanent identity key. KeyDirectory/ed25519_master_id_secret_key The private part of a relay’s Ed25519 permanent identity key. This key is used to sign the medium-term ed25519 signing key. This file can be kept offline or encrypted. If so, Tor will not be able to generate new signing keys automatically; you’ll need to use tor --keygen to do so. KeyDirectory/ed25519_signing_secret_key The private and public components of a relay’s medium-term Ed25519 signing key. This key is authenticated by the Ed25519 master key, which in turn authenticates other keys (and router descriptors). KeyDirectory/ed25519_signing_cert The certificate which authenticates "ed25519_signing_secret_key" as having been signed by the Ed25519 master key. KeyDirectory/secret_onion_key and secret_onion_key.old A relay’s RSA1024 short-term onion key. Used to decrypt old-style ("TAP") circuit extension requests. The .old file holds the previously generated key, which the relay uses to handle any requests that were made by clients that didn’t have the new one. KeyDirectory/secret_onion_key_ntor and secret_onion_key_ntor.old A relay’s Curve25519 short-term onion key. Used to handle modern ("ntor") circuit extension requests. The .old file holds the previously generated key, which the relay uses to handle any requests that were made by clients that didn’t have the new one. DataDirectory/fingerprint Only used by servers. Contains the fingerprint of the server’s RSA identity key. DataDirectory/fingerprint-ed25519 Only used by servers. Contains the fingerprint of the server’s ed25519 identity key. DataDirectory/hashed-fingerprint Only used by bridges. Contains the hashed fingerprint of the bridge’s identity key. (That is, the hash of the hash of the identity key.) DataDirectory/approved-routers Only used by authoritative directory servers. Each line lists a status and an identity, separated by whitespace. Identities can be hex-encoded RSA fingerprints, or base-64 encoded ed25519 public keys. See the fingerprint file in a tor relay’s DataDirectory for an example fingerprint line. If the status is !reject, then descriptors from the given identity are rejected by this server. If it is !invalid then descriptors are accepted, but marked in the vote as not valid. If it is !badexit, then the authority will vote for it to receive a BadExit flag, indicating that it shouldn’t be used for traffic leaving the Tor network. If it is !middleonly, then the authority will vote for it to only be used in the middle of circuits. (Neither rejected nor invalid relays are included in the consensus.) DataDirectory/v3-status-votes Only for v3 authoritative directory servers. This file contains status votes from all the authoritative directory servers. CacheDirectory/unverified-consensus Contains a network consensus document that has been downloaded, but which we didn’t have the right certificates to check yet. CacheDirectory/unverified-microdesc-consensus Contains a microdescriptor-flavored network consensus document that has been downloaded, but which we didn’t have the right certificates to check yet. DataDirectory/unparseable-desc Onion server descriptors that Tor was unable to parse are dumped to this file. Only used for debugging. DataDirectory/router-stability Only used by authoritative directory servers. Tracks measurements for router mean-time-between-failures so that authorities have a fair idea of how to set their Stable flags. DataDirectory/stats/dirreq-stats Only used by directory caches and authorities. This file is used to collect directory request statistics. DataDirectory/stats/entry-stats Only used by servers. This file is used to collect incoming connection statistics by Tor entry nodes. DataDirectory/stats/bridge-stats Only used by servers. This file is used to collect incoming connection statistics by Tor bridges. DataDirectory/stats/exit-stats Only used by servers. This file is used to collect outgoing connection statistics by Tor exit routers. DataDirectory/stats/buffer-stats Only used by servers. This file is used to collect buffer usage history. DataDirectory/stats/conn-stats Only used by servers. This file is used to collect approximate connection history (number of active connections over time). DataDirectory/stats/hidserv-stats Only used by servers. This file is used to collect approximate counts of what fraction of the traffic is hidden service rendezvous traffic, and approximately how many hidden services the relay has seen. DataDirectory/networkstatus-bridges` Only used by authoritative bridge directories. Contains information about bridges that have self-reported themselves to the bridge authority. HiddenServiceDirectory/hostname The <base32-encoded-fingerprint>.onion domain name for this hidden service. If the hidden service is restricted to authorized clients only, this file also contains authorization data for all clients. Note The clients will ignore any extra subdomains prepended to a hidden service hostname. Supposing you have "xyz.onion" as your hostname, you can ask your clients to connect to "www.xyz.onion" or "irc.xyz.onion" for virtual-hosting purposes. HiddenServiceDirectory/private_key Contains the private key for this hidden service. HiddenServiceDirectory/client_keys Contains authorization data for a hidden service that is only accessible by authorized clients. HiddenServiceDirectory/onion_service_non_anonymous This file is present if a hidden service key was created in HiddenServiceNonAnonymousMode. SEE ALSO For more information, refer to the Tor Project website at https://www.torproject.org/ and the Tor specifications at https://spec.torproject.org. See also torsocks(1) and torify(1). BUGS Because Tor is still under development, there may be plenty of bugs. Please report them at https://bugs.torproject.org/. Tor 12/08/2023 TOR(1)
|
tor - The second-generation onion router
|
tor [OPTION value]...
| null | null |
myisamchk
|
The myisamchk utility gets information about your database tables or checks, repairs, or optimizes them. myisamchk works with MyISAM tables (tables that have .MYD and .MYI files for storing data and indexes). You can also use the CHECK TABLE and REPAIR TABLE statements to check and repair MyISAM tables. See Section 13.7.3.2, “CHECK TABLE Statement”, and Section 13.7.3.5, “REPAIR TABLE Statement”. The use of myisamchk with partitioned tables is not supported. Caution It is best to make a backup of a table before performing a table repair operation; under some circumstances the operation might cause data loss. Possible causes include but are not limited to file system errors. Invoke myisamchk like this: myisamchk [options] tbl_name ... The options specify what you want myisamchk to do. They are described in the following sections. You can also get a list of options by invoking myisamchk --help. With no options, myisamchk simply checks your table as the default operation. To get more information or to tell myisamchk to take corrective action, specify options as described in the following discussion. tbl_name is the database table you want to check or repair. If you run myisamchk somewhere other than in the database directory, you must specify the path to the database directory, because myisamchk has no idea where the database is located. In fact, myisamchk does not actually care whether the files you are working on are located in a database directory. You can copy the files that correspond to a database table into some other location and perform recovery operations on them there. You can name several tables on the myisamchk command line if you wish. You can also specify a table by naming its index file (the file with the .MYI suffix). This enables you to specify all tables in a directory by using the pattern *.MYI. For example, if you are in a database directory, you can check all the MyISAM tables in that directory like this: myisamchk *.MYI If you are not in the database directory, you can check all the tables there by specifying the path to the directory: myisamchk /path/to/database_dir/*.MYI You can even check all tables in all databases by specifying a wildcard with the path to the MySQL data directory: myisamchk /path/to/datadir/*/*.MYI The recommended way to quickly check all MyISAM tables is: myisamchk --silent --fast /path/to/datadir/*/*.MYI If you want to check all MyISAM tables and repair any that are corrupted, you can use the following command: myisamchk --silent --force --fast --update-state \ --key_buffer_size=64M --myisam_sort_buffer_size=64M \ --read_buffer_size=1M --write_buffer_size=1M \ /path/to/datadir/*/*.MYI This command assumes that you have more than 64MB free. For more information about memory allocation with myisamchk, see the section called “MYISAMCHK MEMORY USAGE”. For additional information about using myisamchk, see Section 7.6, “MyISAM Table Maintenance and Crash Recovery”. Important You must ensure that no other program is using the tables while you are running myisamchk. The most effective means of doing so is to shut down the MySQL server while running myisamchk, or to lock all tables that myisamchk is being used on. Otherwise, when you run myisamchk, it may display the following error message: warning: clients are using or haven't closed the table properly This means that you are trying to check a table that has been updated by another program (such as the mysqld server) that hasn't yet closed the file or that has died without closing the file properly, which can sometimes lead to the corruption of one or more MyISAM tables. If mysqld is running, you must force it to flush any table modifications that are still buffered in memory by using FLUSH TABLES. You should then ensure that no one is using the tables while you are running myisamchk However, the easiest way to avoid this problem is to use CHECK TABLE instead of myisamchk to check tables. See Section 13.7.3.2, “CHECK TABLE Statement”. myisamchk supports the following options, which can be specified on the command line or in the [myisamchk] group of an option file. For information about option files used by MySQL programs, see Section 4.2.2.2, “Using Option Files”. MYISAMCHK GENERAL OPTIONS The options described in this section can be used for any type of table maintenance operation performed by myisamchk. The sections following this one describe options that pertain only to specific operations, such as table checking or repairing. • --help, -? ┌────────────────────┬────────┐ │Command-Line Format │ --help │ └────────────────────┴────────┘ Display a help message and exit. Options are grouped by type of operation. • --HELP, -H ┌────────────────────┬────────┐ │Command-Line Format │ --HELP │ └────────────────────┴────────┘ Display a help message and exit. Options are presented in a single list. • --debug=debug_options, -# debug_options ┌────────────────────┬────────────────────────────┐ │Command-Line Format │ --debug[=debug_options] │ ├────────────────────┼────────────────────────────┤ │Type │ String │ ├────────────────────┼────────────────────────────┤ │Default Value │ d:t:o,/tmp/myisamchk.trace │ └────────────────────┴────────────────────────────┘ Write a debugging log. A typical debug_options string is d:t:o,file_name. The default is d:t:o,/tmp/myisamchk.trace. This option is available only if MySQL was built using WITH_DEBUG. MySQL release binaries provided by Oracle are not built using this option. • --defaults-extra-file=file_name ┌────────────────────┬─────────────────────────────────┐ │Command-Line Format │ --defaults-extra-file=file_name │ ├────────────────────┼─────────────────────────────────┤ │Type │ File name │ └────────────────────┴─────────────────────────────────┘ Read this option file after the global option file but (on Unix) before the user option file. If the file does not exist or is otherwise inaccessible, an error occurs. If file_name is not an absolute path name, it is interpreted relative to the current directory. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --defaults-file=file_name ┌────────────────────┬───────────────────────────┐ │Command-Line Format │ --defaults-file=file_name │ ├────────────────────┼───────────────────────────┤ │Type │ File name │ └────────────────────┴───────────────────────────┘ Use only the given option file. If the file does not exist or is otherwise inaccessible, an error occurs. If file_name is not an absolute path name, it is interpreted relative to the current directory. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --defaults-group-suffix=str ┌────────────────────┬─────────────────────────────┐ │Command-Line Format │ --defaults-group-suffix=str │ ├────────────────────┼─────────────────────────────┤ │Type │ String │ └────────────────────┴─────────────────────────────┘ Read not only the usual option groups, but also groups with the usual names and a suffix of str. For example, myisamchk normally reads the [myisamchk] group. If this option is given as --defaults-group-suffix=_other, myisamchk also reads the [myisamchk_other] group. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --no-defaults ┌────────────────────┬───────────────┐ │Command-Line Format │ --no-defaults │ └────────────────────┴───────────────┘ Do not read any option files. If program startup fails due to reading unknown options from an option file, --no-defaults can be used to prevent them from being read. The exception is that the .mylogin.cnf file is read in all cases, if it exists. This permits passwords to be specified in a safer way than on the command line even when --no-defaults is used. To create .mylogin.cnf, use the mysql_config_editor utility. See mysql_config_editor(1). For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --print-defaults ┌────────────────────┬──────────────────┐ │Command-Line Format │ --print-defaults │ └────────────────────┴──────────────────┘ Print the program name and all options that it gets from option files. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --silent, -s ┌────────────────────┬──────────┐ │Command-Line Format │ --silent │ └────────────────────┴──────────┘ Silent mode. Write output only when errors occur. You can use -s twice (-ss) to make myisamchk very silent. • --verbose, -v ┌────────────────────┬───────────┐ │Command-Line Format │ --verbose │ └────────────────────┴───────────┘ Verbose mode. Print more information about what the program does. This can be used with -d and -e. Use -v multiple times (-vv, -vvv) for even more output. • --version, -V ┌────────────────────┬───────────┐ │Command-Line Format │ --version │ └────────────────────┴───────────┘ Display version information and exit. • --wait, -w ┌────────────────────┬─────────┐ │Command-Line Format │ --wait │ ├────────────────────┼─────────┤ │Type │ Boolean │ ├────────────────────┼─────────┤ │Default Value │ false │ └────────────────────┴─────────┘ Instead of terminating with an error if the table is locked, wait until the table is unlocked before continuing. If you are running mysqld with external locking disabled, the table can be locked only by another myisamchk command. You can also set the following variables by using --var_name=value syntax: ┌───────────────────────┬───────────────────┐ │Variable │ Default Value │ ├───────────────────────┼───────────────────┤ │decode_bits │ 9 │ ├───────────────────────┼───────────────────┤ │ft_max_word_len │ version-dependent │ ├───────────────────────┼───────────────────┤ │ft_min_word_len │ 4 │ ├───────────────────────┼───────────────────┤ │ft_stopword_file │ built-in list │ ├───────────────────────┼───────────────────┤ │key_buffer_size │ 523264 │ ├───────────────────────┼───────────────────┤ │myisam_block_size │ 1024 │ ├───────────────────────┼───────────────────┤ │myisam_sort_key_blocks │ 16 │ ├───────────────────────┼───────────────────┤ │read_buffer_size │ 262136 │ ├───────────────────────┼───────────────────┤ │sort_buffer_size │ 2097144 │ ├───────────────────────┼───────────────────┤ │sort_key_blocks │ 16 │ ├───────────────────────┼───────────────────┤ │stats_method │ nulls_unequal │ ├───────────────────────┼───────────────────┤ │write_buffer_size │ 262136 │ └───────────────────────┴───────────────────┘ The possible myisamchk variables and their default values can be examined with myisamchk --help: myisam_sort_buffer_size is used when the keys are repaired by sorting keys, which is the normal case when you use --recover. sort_buffer_size is a deprecated synonym for myisam_sort_buffer_size. key_buffer_size is used when you are checking the table with --extend-check or when the keys are repaired by inserting keys row by row into the table (like when doing normal inserts). Repairing through the key buffer is used in the following cases: • You use --safe-recover. • The temporary files needed to sort the keys would be more than twice as big as when creating the key file directly. This is often the case when you have large key values for CHAR, VARCHAR, or TEXT columns, because the sort operation needs to store the complete key values as it proceeds. If you have lots of temporary space and you can force myisamchk to repair by sorting, you can use the --sort-recover option. Repairing through the key buffer takes much less disk space than using sorting, but is also much slower. If you want a faster repair, set the key_buffer_size and myisam_sort_buffer_size variables to about 25% of your available memory. You can set both variables to large values, because only one of them is used at a time. myisam_block_size is the size used for index blocks. stats_method influences how NULL values are treated for index statistics collection when the --analyze option is given. It acts like the myisam_stats_method system variable. For more information, see the description of myisam_stats_method in Section 5.1.8, “Server System Variables”, and Section 8.3.8, “InnoDB and MyISAM Index Statistics Collection”. ft_min_word_len and ft_max_word_len indicate the minimum and maximum word length for FULLTEXT indexes on MyISAM tables. ft_stopword_file names the stopword file. These need to be set under the following circumstances. If you use myisamchk to perform an operation that modifies table indexes (such as repair or analyze), the FULLTEXT indexes are rebuilt using the default full-text parameter values for minimum and maximum word length and the stopword file unless you specify otherwise. This can result in queries failing. The problem occurs because these parameters are known only by the server. They are not stored in MyISAM index files. To avoid the problem if you have modified the minimum or maximum word length or the stopword file in the server, specify the same ft_min_word_len, ft_max_word_len, and ft_stopword_file values to myisamchk that you use for mysqld. For example, if you have set the minimum word length to 3, you can repair a table with myisamchk like this: myisamchk --recover --ft_min_word_len=3 tbl_name.MYI To ensure that myisamchk and the server use the same values for full-text parameters, you can place each one in both the [mysqld] and [myisamchk] sections of an option file: [mysqld] ft_min_word_len=3 [myisamchk] ft_min_word_len=3 An alternative to using myisamchk is to use the REPAIR TABLE, ANALYZE TABLE, OPTIMIZE TABLE, or ALTER TABLE. These statements are performed by the server, which knows the proper full-text parameter values to use. MYISAMCHK CHECK OPTIONS myisamchk supports the following options for table checking operations: • --check, -c ┌────────────────────┬─────────┐ │Command-Line Format │ --check │ └────────────────────┴─────────┘ Check the table for errors. This is the default operation if you specify no option that selects an operation type explicitly. • --check-only-changed, -C ┌────────────────────┬──────────────────────┐ │Command-Line Format │ --check-only-changed │ └────────────────────┴──────────────────────┘ Check only tables that have changed since the last check. • --extend-check, -e ┌────────────────────┬────────────────┐ │Command-Line Format │ --extend-check │ └────────────────────┴────────────────┘ Check the table very thoroughly. This is quite slow if the table has many indexes. This option should only be used in extreme cases. Normally, myisamchk or myisamchk --medium-check should be able to determine whether there are any errors in the table. If you are using --extend-check and have plenty of memory, setting the key_buffer_size variable to a large value helps the repair operation run faster. See also the description of this option under table repair options. For a description of the output format, see the section called “OBTAINING TABLE INFORMATION WITH MYISAMCHK”. • --fast, -F ┌────────────────────┬────────┐ │Command-Line Format │ --fast │ └────────────────────┴────────┘ Check only tables that haven't been closed properly. • --force, -f ┌────────────────────┬─────────┐ │Command-Line Format │ --force │ └────────────────────┴─────────┘ Do a repair operation automatically if myisamchk finds any errors in the table. The repair type is the same as that specified with the --recover or -r option. • --information, -i ┌────────────────────┬───────────────┐ │Command-Line Format │ --information │ └────────────────────┴───────────────┘ Print informational statistics about the table that is checked. • --medium-check, -m ┌────────────────────┬────────────────┐ │Command-Line Format │ --medium-check │ └────────────────────┴────────────────┘ Do a check that is faster than an --extend-check operation. This finds only 99.99% of all errors, which should be good enough in most cases. • --read-only, -T ┌────────────────────┬─────────────┐ │Command-Line Format │ --read-only │ └────────────────────┴─────────────┘ Do not mark the table as checked. This is useful if you use myisamchk to check a table that is in use by some other application that does not use locking, such as mysqld when run with external locking disabled. • --update-state, -U ┌────────────────────┬────────────────┐ │Command-Line Format │ --update-state │ └────────────────────┴────────────────┘ Store information in the .MYI file to indicate when the table was checked and whether the table crashed. This should be used to get full benefit of the --check-only-changed option, but you shouldn't use this option if the mysqld server is using the table and you are running it with external locking disabled. MYISAMCHK REPAIR OPTIONS myisamchk supports the following options for table repair operations (operations performed when an option such as --recover or --safe-recover is given): • --backup, -B ┌────────────────────┬──────────┐ │Command-Line Format │ --backup │ └────────────────────┴──────────┘ Make a backup of the .MYD file as file_name-time.BAK • --character-sets-dir=dir_name ┌────────────────────┬───────────────────────────┐ │Command-Line Format │ --character-sets-dir=path │ ├────────────────────┼───────────────────────────┤ │Type │ String │ ├────────────────────┼───────────────────────────┤ │Default Value │ [none] │ └────────────────────┴───────────────────────────┘ The directory where character sets are installed. See Section 10.15, “Character Set Configuration”. • --correct-checksum ┌────────────────────┬────────────────────┐ │Command-Line Format │ --correct-checksum │ └────────────────────┴────────────────────┘ Correct the checksum information for the table. • --data-file-length=len, -D len ┌────────────────────┬────────────────────────┐ │Command-Line Format │ --data-file-length=len │ ├────────────────────┼────────────────────────┤ │Type │ Numeric │ └────────────────────┴────────────────────────┘ The maximum length of the data file (when re-creating data file when it is “full”). • --extend-check, -e ┌────────────────────┬────────────────┐ │Command-Line Format │ --extend-check │ └────────────────────┴────────────────┘ Do a repair that tries to recover every possible row from the data file. Normally, this also finds a lot of garbage rows. Do not use this option unless you are desperate. See also the description of this option under table checking options. For a description of the output format, see the section called “OBTAINING TABLE INFORMATION WITH MYISAMCHK”. • --force, -f ┌────────────────────┬─────────┐ │Command-Line Format │ --force │ └────────────────────┴─────────┘ Overwrite old intermediate files (files with names like tbl_name.TMD) instead of aborting. • --keys-used=val, -k val ┌────────────────────┬─────────────────┐ │Command-Line Format │ --keys-used=val │ ├────────────────────┼─────────────────┤ │Type │ Numeric │ └────────────────────┴─────────────────┘ For myisamchk, the option value is a bit value that indicates which indexes to update. Each binary bit of the option value corresponds to a table index, where the first index is bit 0. An option value of 0 disables updates to all indexes, which can be used to get faster inserts. Deactivated indexes can be reactivated by using myisamchk -r. • --max-record-length=len ┌────────────────────┬─────────────────────────┐ │Command-Line Format │ --max-record-length=len │ ├────────────────────┼─────────────────────────┤ │Type │ Numeric │ └────────────────────┴─────────────────────────┘ Skip rows larger than the given length if myisamchk cannot allocate memory to hold them. • --parallel-recover, -p ┌────────────────────┬────────────────────┐ │Command-Line Format │ --parallel-recover │ └────────────────────┴────────────────────┘ Note This option is deprecated in MySQL 8.0.28 and removed in MySQL 8.0.30. Use the same technique as -r and -n, but create all the keys in parallel, using different threads. This is beta-quality code. Use at your own risk! • --quick, -q ┌────────────────────┬─────────┐ │Command-Line Format │ --quick │ └────────────────────┴─────────┘ Achieve a faster repair by modifying only the index file, not the data file. You can specify this option twice to force myisamchk to modify the original data file in case of duplicate keys. • --recover, -r ┌────────────────────┬───────────┐ │Command-Line Format │ --recover │ └────────────────────┴───────────┘ Do a repair that can fix almost any problem except unique keys that are not unique (which is an extremely unlikely error with MyISAM tables). If you want to recover a table, this is the option to try first. You should try --safe-recover only if myisamchk reports that the table cannot be recovered using --recover. (In the unlikely case that --recover fails, the data file remains intact.) If you have lots of memory, you should increase the value of myisam_sort_buffer_size. • --safe-recover, -o ┌────────────────────┬────────────────┐ │Command-Line Format │ --safe-recover │ └────────────────────┴────────────────┘ Do a repair using an old recovery method that reads through all rows in order and updates all index trees based on the rows found. This is an order of magnitude slower than --recover, but can handle a couple of very unlikely cases that --recover cannot. This recovery method also uses much less disk space than --recover. Normally, you should repair first using --recover, and then with --safe-recover only if --recover fails. If you have lots of memory, you should increase the value of key_buffer_size. • --set-collation=name ┌────────────────────┬──────────────────────┐ │Command-Line Format │ --set-collation=name │ ├────────────────────┼──────────────────────┤ │Type │ String │ └────────────────────┴──────────────────────┘ Specify the collation to use for sorting table indexes. The character set name is implied by the first part of the collation name. • --sort-recover, -n ┌────────────────────┬────────────────┐ │Command-Line Format │ --sort-recover │ └────────────────────┴────────────────┘ Force myisamchk to use sorting to resolve the keys even if the temporary files would be very large. • --tmpdir=dir_name, -t dir_name ┌────────────────────┬───────────────────┐ │Command-Line Format │ --tmpdir=dir_name │ ├────────────────────┼───────────────────┤ │Type │ Directory name │ └────────────────────┴───────────────────┘ The path of the directory to be used for storing temporary files. If this is not set, myisamchk uses the value of the TMPDIR environment variable. --tmpdir can be set to a list of directory paths that are used successively in round-robin fashion for creating temporary files. The separator character between directory names is the colon (:) on Unix and the semicolon (;) on Windows. • --unpack, -u ┌────────────────────┬──────────┐ │Command-Line Format │ --unpack │ └────────────────────┴──────────┘ Unpack a table that was packed with myisampack. OTHER MYISAMCHK OPTIONS myisamchk supports the following options for actions other than table checks and repairs: • --analyze, -a ┌────────────────────┬───────────┐ │Command-Line Format │ --analyze │ └────────────────────┴───────────┘ Analyze the distribution of key values. This improves join performance by enabling the join optimizer to better choose the order in which to join the tables and which indexes it should use. To obtain information about the key distribution, use a myisamchk --description --verbose tbl_name command or the SHOW INDEX FROM tbl_name statement. • --block-search=offset, -b offset ┌────────────────────┬───────────────────────┐ │Command-Line Format │ --block-search=offset │ ├────────────────────┼───────────────────────┤ │Type │ Numeric │ └────────────────────┴───────────────────────┘ Find the record that a block at the given offset belongs to. • --description, -d ┌────────────────────┬───────────────┐ │Command-Line Format │ --description │ └────────────────────┴───────────────┘ Print some descriptive information about the table. Specifying the --verbose option once or twice produces additional information. See the section called “OBTAINING TABLE INFORMATION WITH MYISAMCHK”. • --set-auto-increment[=value], -A[value] Force AUTO_INCREMENT numbering for new records to start at the given value (or higher, if there are existing records with AUTO_INCREMENT values this large). If value is not specified, AUTO_INCREMENT numbers for new records begin with the largest value currently in the table, plus one. • --sort-index, -S ┌────────────────────┬──────────────┐ │Command-Line Format │ --sort-index │ └────────────────────┴──────────────┘ Sort the index tree blocks in high-low order. This optimizes seeks and makes table scans that use indexes faster. • --sort-records=N, -R N ┌────────────────────┬──────────────────┐ │Command-Line Format │ --sort-records=# │ ├────────────────────┼──────────────────┤ │Type │ Numeric │ └────────────────────┴──────────────────┘ Sort records according to a particular index. This makes your data much more localized and may speed up range-based SELECT and ORDER BY operations that use this index. (The first time you use this option to sort a table, it may be very slow.) To determine a table's index numbers, use SHOW INDEX, which displays a table's indexes in the same order that myisamchk sees them. Indexes are numbered beginning with 1. If keys are not packed (PACK_KEYS=0), they have the same length, so when myisamchk sorts and moves records, it just overwrites record offsets in the index. If keys are packed (PACK_KEYS=1), myisamchk must unpack key blocks first, then re-create indexes and pack the key blocks again. (In this case, re-creating indexes is faster than updating offsets for each index.) OBTAINING TABLE INFORMATION WITH MYISAMCHK To obtain a description of a MyISAM table or statistics about it, use the commands shown here. The output from these commands is explained later in this section. • myisamchk -d tbl_name Runs myisamchk in “describe mode” to produce a description of your table. If you start the MySQL server with external locking disabled, myisamchk may report an error for a table that is updated while it runs. However, because myisamchk does not change the table in describe mode, there is no risk of destroying data. • myisamchk -dv tbl_name Adding -v runs myisamchk in verbose mode so that it produces more information about the table. Adding -v a second time produces even more information. • myisamchk -eis tbl_name Shows only the most important information from a table. This operation is slow because it must read the entire table. • myisamchk -eiv tbl_name This is like -eis, but tells you what is being done. The tbl_name argument can be either the name of a MyISAM table or the name of its index file, as described in myisamchk(1). Multiple tbl_name arguments can be given. Suppose that a table named person has the following structure. (The MAX_ROWS table option is included so that in the example output from myisamchk shown later, some values are smaller and fit the output format more easily.) CREATE TABLE person ( id INT NOT NULL AUTO_INCREMENT, last_name VARCHAR(20) NOT NULL, first_name VARCHAR(20) NOT NULL, birth DATE, death DATE, PRIMARY KEY (id), INDEX (last_name, first_name), INDEX (birth) ) MAX_ROWS = 1000000 ENGINE=MYISAM; Suppose also that the table has these data and index file sizes: -rw-rw---- 1 mysql mysql 9347072 Aug 19 11:47 person.MYD -rw-rw---- 1 mysql mysql 6066176 Aug 19 11:47 person.MYI Example of myisamchk -dvv output: MyISAM file: person Record format: Packed Character set: utf8mb4_0900_ai_ci (255) File-version: 1 Creation time: 2017-03-30 21:21:30 Status: checked,analyzed,optimized keys,sorted index pages Auto increment key: 1 Last value: 306688 Data records: 306688 Deleted blocks: 0 Datafile parts: 306688 Deleted data: 0 Datafile pointer (bytes): 4 Keyfile pointer (bytes): 3 Datafile length: 9347072 Keyfile length: 6066176 Max datafile length: 4294967294 Max keyfile length: 17179868159 Recordlength: 54 table description: Key Start Len Index Type Rec/key Root Blocksize 1 2 4 unique long 1 1024 2 6 80 multip. varchar prefix 0 1024 87 80 varchar 0 3 168 3 multip. uint24 NULL 0 1024 Field Start Length Nullpos Nullbit Type 1 1 1 2 2 4 no zeros 3 6 81 varchar 4 87 81 varchar 5 168 3 1 1 no zeros 6 171 3 1 2 no zeros Explanations for the types of information myisamchk produces are given here. “Keyfile” refers to the index file. “Record” and “row” are synonymous, as are “field” and “column.” The initial part of the table description contains these values: • MyISAM file Name of the MyISAM (index) file. • Record format The format used to store table rows. The preceding examples use Fixed length. Other possible values are Compressed and Packed. (Packed corresponds to what SHOW TABLE STATUS reports as Dynamic.) • Chararacter set The table default character set. • File-version Version of MyISAM format. Always 1. • Creation time When the data file was created. • Recover time When the index/data file was last reconstructed. • Status Table status flags. Possible values are crashed, open, changed, analyzed, optimized keys, and sorted index pages. • Auto increment key, Last value The key number associated the table's AUTO_INCREMENT column, and the most recently generated value for this column. These fields do not appear if there is no such column. • Data records The number of rows in the table. • Deleted blocks How many deleted blocks still have reserved space. You can optimize your table to minimize this space. See Section 7.6.4, “MyISAM Table Optimization”. • Datafile parts For dynamic-row format, this indicates how many data blocks there are. For an optimized table without fragmented rows, this is the same as Data records. • Deleted data How many bytes of unreclaimed deleted data there are. You can optimize your table to minimize this space. See Section 7.6.4, “MyISAM Table Optimization”. • Datafile pointer The size of the data file pointer, in bytes. It is usually 2, 3, 4, or 5 bytes. Most tables manage with 2 bytes, but this cannot be controlled from MySQL yet. For fixed tables, this is a row address. For dynamic tables, this is a byte address. • Keyfile pointer The size of the index file pointer, in bytes. It is usually 1, 2, or 3 bytes. Most tables manage with 2 bytes, but this is calculated automatically by MySQL. It is always a block address. • Max datafile length How long the table data file can become, in bytes. • Max keyfile length How long the table index file can become, in bytes. • Recordlength How much space each row takes, in bytes. The table description part of the output includes a list of all keys in the table. For each key, myisamchk displays some low-level information: • Key This key's number. This value is shown only for the first column of the key. If this value is missing, the line corresponds to the second or later column of a multiple-column key. For the table shown in the example, there are two table description lines for the second index. This indicates that it is a multiple-part index with two parts. • Start Where in the row this portion of the index starts. • Len How long this portion of the index is. For packed numbers, this should always be the full length of the column. For strings, it may be shorter than the full length of the indexed column, because you can index a prefix of a string column. The total length of a multiple-part key is the sum of the Len values for all key parts. • Index Whether a key value can exist multiple times in the index. Possible values are unique or multip. (multiple). • Type What data type this portion of the index has. This is a MyISAM data type with the possible values packed, stripped, or empty. • Root Address of the root index block. • Blocksize The size of each index block. By default this is 1024, but the value may be changed at compile time when MySQL is built from source. • Rec/key This is a statistical value used by the optimizer. It tells how many rows there are per value for this index. A unique index always has a value of 1. This may be updated after a table is loaded (or greatly changed) with myisamchk -a. If this is not updated at all, a default value of 30 is given. The last part of the output provides information about each column: • Field The column number. • Start The byte position of the column within table rows. • Length The length of the column in bytes. • Nullpos, Nullbit For columns that can be NULL, MyISAM stores NULL values as a flag in a byte. Depending on how many nullable columns there are, there can be one or more bytes used for this purpose. The Nullpos and Nullbit values, if nonempty, indicate which byte and bit contains that flag indicating whether the column is NULL. The position and number of bytes used to store NULL flags is shown in the line for field 1. This is why there are six Field lines for the person table even though it has only five columns. • Type The data type. The value may contain any of the following descriptors: • constant All rows have the same value. • no endspace Do not store endspace. • no endspace, not_always Do not store endspace and do not do endspace compression for all values. • no endspace, no empty Do not store endspace. Do not store empty values. • table-lookup The column was converted to an ENUM. • zerofill(N) The most significant N bytes in the value are always 0 and are not stored. • no zeros Do not store zeros. • always zero Zero values are stored using one bit. • Huff tree The number of the Huffman tree associated with the column. • Bits The number of bits used in the Huffman tree. The Huff tree and Bits fields are displayed if the table has been compressed with myisampack. See myisampack(1), for an example of this information. Example of myisamchk -eiv output: Checking MyISAM file: person Data records: 306688 Deleted blocks: 0 - check file-size - check record delete-chain No recordlinks - check key delete-chain block_size 1024: - check index reference - check data record references index: 1 Key: 1: Keyblocks used: 98% Packed: 0% Max levels: 3 - check data record references index: 2 Key: 2: Keyblocks used: 99% Packed: 97% Max levels: 3 - check data record references index: 3 Key: 3: Keyblocks used: 98% Packed: -14% Max levels: 3 Total: Keyblocks used: 98% Packed: 89% - check records and index references *** LOTS OF ROW NUMBERS DELETED *** Records: 306688 M.recordlength: 25 Packed: 83% Recordspace used: 97% Empty space: 2% Blocks/Record: 1.00 Record blocks: 306688 Delete blocks: 0 Record data: 7934464 Deleted data: 0 Lost space: 256512 Linkdata: 1156096 User time 43.08, System time 1.68 Maximum resident set size 0, Integral resident set size 0 Non-physical pagefaults 0, Physical pagefaults 0, Swaps 0 Blocks in 0 out 7, Messages in 0 out 0, Signals 0 Voluntary context switches 0, Involuntary context switches 0 Maximum memory usage: 1046926 bytes (1023k) myisamchk -eiv output includes the following information: • Data records The number of rows in the table. • Deleted blocks How many deleted blocks still have reserved space. You can optimize your table to minimize this space. See Section 7.6.4, “MyISAM Table Optimization”. • Key The key number. • Keyblocks used What percentage of the keyblocks are used. When a table has just been reorganized with myisamchk, the values are very high (very near theoretical maximum). • Packed MySQL tries to pack key values that have a common suffix. This can only be used for indexes on CHAR and VARCHAR columns. For long indexed strings that have similar leftmost parts, this can significantly reduce the space used. In the preceding example, the second key is 40 bytes long and a 97% reduction in space is achieved. • Max levels How deep the B-tree for this key is. Large tables with long key values get high values. • Records How many rows are in the table. • M.recordlength The average row length. This is the exact row length for tables with fixed-length rows, because all rows have the same length. • Packed MySQL strips spaces from the end of strings. The Packed value indicates the percentage of savings achieved by doing this. • Recordspace used What percentage of the data file is used. • Empty space What percentage of the data file is unused. • Blocks/Record Average number of blocks per row (that is, how many links a fragmented row is composed of). This is always 1.0 for fixed-format tables. This value should stay as close to 1.0 as possible. If it gets too large, you can reorganize the table. See Section 7.6.4, “MyISAM Table Optimization”. • Recordblocks How many blocks (links) are used. For fixed-format tables, this is the same as the number of rows. • Deleteblocks How many blocks (links) are deleted. • Recorddata How many bytes in the data file are used. • Deleted data How many bytes in the data file are deleted (unused). • Lost space If a row is updated to a shorter length, some space is lost. This is the sum of all such losses, in bytes. • Linkdata When the dynamic table format is used, row fragments are linked with pointers (4 to 7 bytes each). Linkdata is the sum of the amount of storage used by all such pointers. MYISAMCHK MEMORY USAGE Memory allocation is important when you run myisamchk. myisamchk uses no more memory than its memory-related variables are set to. If you are going to use myisamchk on very large tables, you should first decide how much memory you want it to use. The default is to use only about 3MB to perform repairs. By using larger values, you can get myisamchk to operate faster. For example, if you have more than 512MB RAM available, you could use options such as these (in addition to any other options you might specify): myisamchk --myisam_sort_buffer_size=256M \ --key_buffer_size=512M \ --read_buffer_size=64M \ --write_buffer_size=64M ... Using --myisam_sort_buffer_size=16M is probably enough for most cases. Be aware that myisamchk uses temporary files in TMPDIR. If TMPDIR points to a memory file system, out of memory errors can easily occur. If this happens, run myisamchk with the --tmpdir=dir_name option to specify a directory located on a file system that has more space. When performing repair operations, myisamchk also needs a lot of disk space: • Twice the size of the data file (the original file and a copy). This space is not needed if you do a repair with --quick; in this case, only the index file is re-created. This space must be available on the same file system as the original data file, as the copy is created in the same directory as the original. • Space for the new index file that replaces the old one. The old index file is truncated at the start of the repair operation, so you usually ignore this space. This space must be available on the same file system as the original data file. • When using --recover or --sort-recover (but not when using --safe-recover), you need space on disk for sorting. This space is allocated in the temporary directory (specified by TMPDIR or --tmpdir=dir_name). The following formula yields the amount of space required: (largest_key + row_pointer_length) * number_of_rows * 2 You can check the length of the keys and the row_pointer_length with myisamchk -dv tbl_name (see the section called “OBTAINING TABLE INFORMATION WITH MYISAMCHK”). The row_pointer_length and number_of_rows values are the Datafile pointer and Data records values in the table description. To determine the largest_key value, check the Key lines in the table description. The Len column indicates the number of bytes for each key part. For a multiple-column index, the key size is the sum of the Len values for all key parts. If you have a problem with disk space during repair, you can try --safe-recover instead of --recover. COPYRIGHT Copyright © 1997, 2023, Oracle and/or its affiliates. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. SEE ALSO For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. AUTHOR Oracle Corporation (http://dev.mysql.com/). MySQL 8.3 11/23/2023 MYISAMCHK(1)
|
myisamchk - MyISAM table-maintenance utility
|
myisamchk [options] tbl_name ...
| null | null |
patcheck
| null | null | null | null | null |
env_parallel.bash
| null | null | null | null | null |
ocsptool
|
On verification Responses are typically signed/issued by designated certificates or certificate authorities and thus this tool requires on verification the certificate of the issuer or the full certificate chain in order to determine the appropriate signing authority. The specified certificate of the issuer is assumed trusted.
|
ocsptool - GnuTLS OCSP tool
|
ocsptool [-flags] [-flag [value]] [--option-name[[=| ]value]] All arguments must be options.
|
-d num, --debug=num Enable debugging. This option takes an integer number as its argument. The value of num is constrained to being: in the range 0 through 9999 Specifies the debug level. -V, --verbose More verbose output. --infile=file Input file. --outfile=str Output file. --ask=server name|url Ask an OCSP/HTTP server on a certificate validity. Connects to the specified HTTP OCSP server and queries on the validity of the loaded certificate. Its argument can be a URL or a plain server name. It can be combined with --load-chain, where it checks all certificates in the provided chain, or with --load-cert and --load-issuer options. The latter checks the provided certificate against its specified issuer certificate. -e, --verify-response Verify response. Verifies the provided OCSP response against the system trust anchors (unless --load-trust is provided). It requires the --load-signer or --load-chain options to obtain the signer of the OCSP response. -i, --request-info Print information on a OCSP request. Display detailed information on the provided OCSP request. -j, --response-info Print information on a OCSP response. Display detailed information on the provided OCSP response. -q, --generate-request Generates an OCSP request. --nonce, --no-nonce Use (or not) a nonce to OCSP request. The no-nonce form will disable the option. --load-chain=file Reads a set of certificates forming a chain from file. --load-issuer=file Reads issuer's certificate from file. --load-cert=file Reads the certificate to check from file. --load-trust=file Read OCSP trust anchors from file. This option must not appear in combination with any of the following options: load-signer. When verifying an OCSP response read the trust anchors from the provided file. When this is not provided, the system's trust anchors will be used. --load-signer=file Reads the OCSP response signer from file. This option must not appear in combination with any of the following options: load- trust. --inder, --no-inder Use DER format for input certificates and private keys. The no-inder form will disable the option. --outder Use DER format for output of responses (this is the default). The output will be in DER encoded format. Unlike other GnuTLS tools, this is the default for this tool --outpem Use PEM format for output of responses. The output will be in PEM format. -Q file, --load-request=file Reads the DER encoded OCSP request from file. -S file, --load-response=file Reads the DER encoded OCSP response from file. --ignore-errors Ignore any verification errors. --verify-allow-broken Allow broken algorithms, such as MD5 for verification. This can be combined with --verify-response. --attime=timestamp Perform validation at the timestamp instead of the system time. timestamp is an instance in time encoded as Unix time or in a human readable timestring such as "29 Feb 2004", "2004-02-29". Full documentation available at <https://www.gnu.org/software/coreutils/manual/html_node/Date-input-formats.html> or locally via info '(coreutils) date invocation'. -v arg, --version=arg Output version of program and exit. The default mode is `v', a simple version. The `c' mode will print copyright information and `n' will print the full copyright notice. -h, --help Display usage information and exit. -!, --more-help Pass the extended usage information through a pager.
|
Print information about an OCSP request To parse an OCSP request and print information about the content, the -i or --request-info parameter may be used as follows. The -Q parameter specify the name of the file containing the OCSP request, and it should contain the OCSP request in binary DER format. $ ocsptool -i -Q ocsp-request.der The input file may also be sent to standard input like this: $ cat ocsp-request.der | ocsptool --request-info Print information about an OCSP response Similar to parsing OCSP requests, OCSP responses can be parsed using the -j or --response-info as follows. $ ocsptool -j -Q ocsp-response.der $ cat ocsp-response.der | ocsptool --response-info Generate an OCSP request The -q or --generate-request parameters are used to generate an OCSP request. By default the OCSP request is written to standard output in binary DER format, but can be stored in a file using --outfile. To generate an OCSP request the issuer of the certificate to check needs to be specified with --load-issuer and the certificate to check with --load-cert. By default PEM format is used for these files, although --inder can be used to specify that the input files are in DER format. $ ocsptool -q --load-issuer issuer.pem --load-cert client.pem --outfile ocsp-request.der When generating OCSP requests, the tool will add an OCSP extension containing a nonce. This behaviour can be disabled by specifying --no-nonce. Verify signature in OCSP response To verify the signature in an OCSP response the -e or --verify-response parameter is used. The tool will read an OCSP response in DER format from standard input, or from the file specified by --load-response. The OCSP response is verified against a set of trust anchors, which are specified using --load-trust. The trust anchors are concatenated certificates in PEM format. The certificate that signed the OCSP response needs to be in the set of trust anchors, or the issuer of the signer certificate needs to be in the set of trust anchors and the OCSP Extended Key Usage bit has to be asserted in the signer certificate. $ ocsptool -e --load-trust issuer.pem --load-response ocsp-response.der The tool will print status of verification. Verify signature in OCSP response against given certificate It is possible to override the normal trust logic if you know that a certain certificate is supposed to have signed the OCSP response, and you want to use it to check the signature. This is achieved using --load-signer instead of --load-trust. This will load one certificate and it will be used to verify the signature in the OCSP response. It will not check the Extended Key Usage bit. $ ocsptool -e --load-signer ocsp-signer.pem --load-response ocsp-response.der This approach is normally only relevant in two situations. The first is when the OCSP response does not contain a copy of the signer certificate, so the --load-trust code would fail. The second is if you want to avoid the indirect mode where the OCSP response signer certificate is signed by a trust anchor. Real-world example Here is an example of how to generate an OCSP request for a certificate and to verify the response. For illustration we'll use the blog.josefsson.org host, which (as of writing) uses a certificate from CACert. First we'll use gnutls-cli to get a copy of the server certificate chain. The server is not required to send this information, but this particular one is configured to do so. $ echo | gnutls-cli -p 443 blog.josefsson.org --save-cert chain.pem The saved certificates normally contain a pointer to where the OCSP responder is located, in the Authority Information Access Information extension. For example, from certtool -i < chain.pem there is this information: Authority Information Access Information (not critical): Access Method: 1.3.6.1.5.5.7.48.1 (id-ad-ocsp) Access Location URI: https://ocsp.CAcert.org/ This means that ocsptool can discover the servers to contact over HTTP. We can now request information on the chain certificates. $ ocsptool --ask --load-chain chain.pem The request is sent via HTTP to the OCSP server address found in the certificates. It is possible to override the address of the OCSP server as well as ask information on a particular certificate using --load-cert and --load-issuer. $ ocsptool --ask https://ocsp.CAcert.org/ --load-chain chain.pem EXIT STATUS One of the following exit values will be returned: 0 (EXIT_SUCCESS) Successful program execution. 1 (EXIT_FAILURE) The operation failed or the command syntax was not valid. SEE ALSO certtool (1) AUTHORS COPYRIGHT Copyright (C) 2020-2023 Free Software Foundation, and others all rights reserved. This program is released under the terms of the GNU General Public License, version 3 or later BUGS Please send bug reports to: bugs@gnutls.org 3.8.4 19 Mar 2024 ocsptool(1)
|
redis-sentinel
| null | null | null | null | null |
gcc-ranlib-13
| null | null | null | null | null |
accelerate-estimate-memory
| null | null | null | null | null |
nginx
|
nginx (pronounced “engine x”) is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server. It is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption. The options are as follows: -?, -h Print help. -c file Use an alternative configuration file. -e file Use an alternative error log file. Special value stderr indicates that the standard error output should be used. -g directives Set global configuration directives. See EXAMPLES for details. -p prefix Set the prefix path. The default value is %%PREFIX%%. -q Suppress non-error messages during configuration testing. -s signal Send a signal to the master process. The argument signal can be one of: stop, quit, reopen, reload. The following table shows the corresponding system signals: stop SIGTERM quit SIGQUIT reopen SIGUSR1 reload SIGHUP -T Same as -t, but additionally dump configuration files to standard output. -t Do not run, just test the configuration file. nginx checks the configuration file syntax and then tries to open files referenced in the configuration file. -V Print the nginx version, compiler version, and configure script parameters. -v Print the nginx version. SIGNALS The master process of nginx can handle the following signals: SIGINT, SIGTERM Shut down quickly. SIGHUP Reload configuration, start the new worker process with a new configuration, and gracefully shut down old worker processes. SIGQUIT Shut down gracefully. SIGUSR1 Reopen log files. SIGUSR2 Upgrade the nginx executable on the fly. SIGWINCH Shut down worker processes gracefully. While there is no need to explicitly control worker processes normally, they support some signals too: SIGTERM Shut down quickly. SIGQUIT Shut down gracefully. SIGUSR1 Reopen log files. DEBUGGING LOG To enable a debugging log, reconfigure nginx to build with debugging: ./configure --with-debug ... and then set the debug level of the error_log: error_log /path/to/log debug; It is also possible to enable the debugging for a particular IP address: events { debug_connection 127.0.0.1; } ENVIRONMENT The NGINX environment variable is used internally by nginx and should not be set directly by the user. FILES %%PID_PATH%% Contains the process ID of nginx. The contents of this file are not sensitive, so it can be world-readable. %%CONF_PATH%% The main configuration file. %%ERROR_LOG_PATH%% Error log file. EXIT STATUS Exit status is 0 on success, or 1 if the command fails.
|
nginx – HTTP and reverse proxy server, mail proxy server
|
nginx [-?hqTtVv] [-c file] [-e file] [-g directives] [-p prefix] [-s signal]
| null |
Test configuration file ~/mynginx.conf with global directives for PID and quantity of worker processes: nginx -t -c ~/mynginx.conf \ -g "pid /var/run/mynginx.pid; worker_processes 2;" SEE ALSO Documentation at http://nginx.org/en/docs/. For questions and technical support, please refer to http://nginx.org/en/support.html. HISTORY Development of nginx started in 2002, with the first public release on October 4, 2004. AUTHORS Igor Sysoev <igor@sysoev.ru>. This manual page was originally written by Sergey A. Osokin <osa@FreeBSD.org.ru> as a result of compiling many nginx documents from all over the world. macOS 14.5 November 5, 2020 macOS 14.5
|
2to3-3.11
| null | null | null | null | null |
sndfile-concat
|
sndfile-concat generates a new output file by concatenating the audio data of two or more input files. The encoding of the output file is the encoding used in infile1. Audio data from the subsequent files are converted to this encoding. The only restriction is that the files must have the same number of channels. The output file is overwritten if it already exists. EXIT STATUS The sndfile-concat utility exits 0 on success, and >0 if an error occurs. SEE ALSO http://libsndfile.github.io/libsndfile/ AUTHORS Erik de Castro Lopo <erikd@mega-nerd.com> macOS 14.5 November 2, 2014 macOS 14.5
|
sndfile-concat – concatenate audio data from two or more audio files
|
sndfile-concat infile1 infile2 ... outfile
| null | null |
pyrsa-decrypt
| null | null | null | null | null |
glibtool
|
Provide generalized library-building support services.
|
libtool - manual page for libtool 2.4.7
|
libtool [OPTION]... [MODE-ARG]...
|
--config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. GNU libtool home page: <http://www.gnu.org/software/libtool/>. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: x86_64-pc-linux-gnu shell: /bin/bash compiler: gcc compiler flags: -g -O2 linker: /usr/bin/ld -m elf_x86_64 (gnu? yes) version: libtool (GNU libtool) 2.4.7 automake: automake (GNU automake) 1.16.3 autoconf: autoconf (GNU Autoconf) 2.69 AUTHOR Written by Gordon Matzigkeit, 1996 REPORTING BUGS Report bugs to <bug-libtool@gnu.org>. COPYRIGHT Copyright © 2014 Free Software Foundation, Inc. SEE ALSO The full documentation for libtool is maintained as a Texinfo manual. If the info and libtool programs are properly installed at your site, the command info libtool should give you access to the complete manual. GNU libtool 2.4.7 March 2022 LIBTOOL(1)
| null |
wsdump
| null | null | null | null | null |
imageio_download_bin
| null | null | null | null | null |
mysql_secure_installation
|
This program enables you to improve the security of your MySQL installation in the following ways: • You can set a password for root accounts. • You can remove root accounts that are accessible from outside the local host. • You can remove anonymous-user accounts. • You can remove the test database (which by default can be accessed by all users, even anonymous users), and privileges that permit anyone to access databases with names that start with test_. mysql_secure_installation helps you implement security recommendations similar to those described at Section 2.9.4, “Securing the Initial MySQL Account”. Normal usage is to connect to the local MySQL server; invoke mysql_secure_installation without arguments: mysql_secure_installation When executed, mysql_secure_installation prompts you to determine which actions to perform. The validate_password component can be used for password strength checking. If the plugin is not installed, mysql_secure_installation prompts the user whether to install it. Any passwords entered later are checked using the plugin if it is enabled. Most of the usual MySQL client options such as --host and --port can be used on the command line and in option files. For example, to connect to the local server over IPv6 using port 3307, use this command: mysql_secure_installation --host=::1 --port=3307 mysql_secure_installation supports the following options, which can be specified on the command line or in the [mysql_secure_installation] and [client] groups of an option file. For information about option files used by MySQL programs, see Section 4.2.2.2, “Using Option Files”. • --help, -? ┌────────────────────┬────────┐ │Command-Line Format │ --help │ └────────────────────┴────────┘ Display a help message and exit. • --defaults-extra-file=file_name ┌────────────────────┬─────────────────────────────────┐ │Command-Line Format │ --defaults-extra-file=file_name │ ├────────────────────┼─────────────────────────────────┤ │Type │ File name │ └────────────────────┴─────────────────────────────────┘ Read this option file after the global option file but (on Unix) before the user option file. If the file does not exist or is otherwise inaccessible, an error occurs. If file_name is not an absolute path name, it is interpreted relative to the current directory. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --defaults-file=file_name ┌────────────────────┬───────────────────────────┐ │Command-Line Format │ --defaults-file=file_name │ ├────────────────────┼───────────────────────────┤ │Type │ File name │ └────────────────────┴───────────────────────────┘ Use only the given option file. If the file does not exist or is otherwise inaccessible, an error occurs. If file_name is not an absolute path name, it is interpreted relative to the current directory. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --defaults-group-suffix=str ┌────────────────────┬─────────────────────────────┐ │Command-Line Format │ --defaults-group-suffix=str │ ├────────────────────┼─────────────────────────────┤ │Type │ String │ └────────────────────┴─────────────────────────────┘ Read not only the usual option groups, but also groups with the usual names and a suffix of str. For example, mysql_secure_installation normally reads the [client] and [mysql_secure_installation] groups. If this option is given as --defaults-group-suffix=_other, mysql_secure_installation also reads the [client_other] and [mysql_secure_installation_other] groups. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --host=host_name, -h host_name ┌────────────────────┬────────┐ │Command-Line Format │ --host │ └────────────────────┴────────┘ Connect to the MySQL server on the given host. • --no-defaults ┌────────────────────┬───────────────┐ │Command-Line Format │ --no-defaults │ └────────────────────┴───────────────┘ Do not read any option files. If program startup fails due to reading unknown options from an option file, --no-defaults can be used to prevent them from being read. The exception is that the .mylogin.cnf file is read in all cases, if it exists. This permits passwords to be specified in a safer way than on the command line even when --no-defaults is used. To create .mylogin.cnf, use the mysql_config_editor utility. See mysql_config_editor(1). For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --password=password, -p password ┌────────────────────┬─────────────────────┐ │Command-Line Format │ --password=password │ ├────────────────────┼─────────────────────┤ │Type │ String │ ├────────────────────┼─────────────────────┤ │Default Value │ [none] │ └────────────────────┴─────────────────────┘ This option is accepted but ignored. Whether or not this option is used, mysql_secure_installation always prompts the user for a password. • --port=port_num, -P port_num ┌────────────────────┬─────────────────┐ │Command-Line Format │ --port=port_num │ ├────────────────────┼─────────────────┤ │Type │ Numeric │ ├────────────────────┼─────────────────┤ │Default Value │ 3306 │ └────────────────────┴─────────────────┘ For TCP/IP connections, the port number to use. • --print-defaults ┌────────────────────┬──────────────────┐ │Command-Line Format │ --print-defaults │ └────────────────────┴──────────────────┘ Print the program name and all options that it gets from option files. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --protocol={TCP|SOCKET|PIPE|MEMORY} ┌────────────────────┬────────────────────────┐ │Command-Line Format │ --protocol=type │ ├────────────────────┼────────────────────────┤ │Type │ String │ ├────────────────────┼────────────────────────┤ │Default Value │ [see text] │ ├────────────────────┼────────────────────────┤ │Valid Values │ TCP SOCKET PIPE │ │ │ MEMORY │ └────────────────────┴────────────────────────┘ The transport protocol to use for connecting to the server. It is useful when the other connection parameters normally result in use of a protocol other than the one you want. For details on the permissible values, see Section 4.2.7, “Connection Transport Protocols”. • --socket=path, -S path ┌────────────────────┬────────────────────────────────┐ │Command-Line Format │ --socket={file_name|pipe_name} │ ├────────────────────┼────────────────────────────────┤ │Type │ String │ └────────────────────┴────────────────────────────────┘ For connections to localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use. On Windows, this option applies only if the server was started with the named_pipe system variable enabled to support named-pipe connections. In addition, the connection must be a member of the Windows group specified by the named_pipe_full_access_group system variable. • --ssl* Options that begin with --ssl specify whether to connect to the server using encryption and indicate where to find SSL keys and certificates. See the section called “Command Options for Encrypted Connections”. • --ssl-fips-mode={OFF|ON|STRICT} ┌────────────────────┬─────────────────────────────────┐ │Command-Line Format │ --ssl-fips-mode={OFF|ON|STRICT} │ ├────────────────────┼─────────────────────────────────┤ │Deprecated │ Yes │ ├────────────────────┼─────────────────────────────────┤ │Type │ Enumeration │ ├────────────────────┼─────────────────────────────────┤ │Default Value │ OFF │ ├────────────────────┼─────────────────────────────────┤ │Valid Values │ OFF ON STRICT │ └────────────────────┴─────────────────────────────────┘ Controls whether to enable FIPS mode on the client side. The --ssl-fips-mode option differs from other --ssl-xxx options in that it is not used to establish encrypted connections, but rather to affect which cryptographic operations to permit. See Section 6.8, “FIPS Support”. These --ssl-fips-mode values are permitted: • OFF: Disable FIPS mode. • ON: Enable FIPS mode. • STRICT: Enable “strict” FIPS mode. Note If the OpenSSL FIPS Object Module is not available, the only permitted value for --ssl-fips-mode is OFF. In this case, setting --ssl-fips-mode to ON or STRICT causes the client to produce a warning at startup and to operate in non-FIPS mode. This option is deprecated. Expect it to be removed in a future version of MySQL. • --tls-ciphersuites=ciphersuite_list ┌────────────────────┬─────────────────────────────────────┐ │Command-Line Format │ --tls-ciphersuites=ciphersuite_list │ ├────────────────────┼─────────────────────────────────────┤ │Type │ String │ └────────────────────┴─────────────────────────────────────┘ The permissible ciphersuites for encrypted connections that use TLSv1.3. The value is a list of one or more colon-separated ciphersuite names. The ciphersuites that can be named for this option depend on the SSL library used to compile MySQL. For details, see Section 6.3.2, “Encrypted Connection TLS Protocols and Ciphers”. • --tls-sni-servername=server_name ┌────────────────────┬──────────────────────────────────┐ │Command-Line Format │ --tls-sni-servername=server_name │ ├────────────────────┼──────────────────────────────────┤ │Type │ String │ └────────────────────┴──────────────────────────────────┘ When specified, the name is passed to the libmysqlclient C API library using the MYSQL_OPT_TLS_SNI_SERVERNAME option of mysql_options(). The server name is not case-sensitive. To show which server name the client specified for the current session, if any, check the Tls_sni_server_name status variable. Server Name Indication (SNI) is an extension to the TLS protocol (OpenSSL must be compiled using TLS extensions for this option to function). The MySQL implementation of SNI represents the client-side only. • --tls-version=protocol_list ┌────────────────────┬───────────────────────────────┐ │Command-Line Format │ --tls-version=protocol_list │ ├────────────────────┼───────────────────────────────┤ │Type │ String │ ├────────────────────┼───────────────────────────────┤ │Default Value │ TLSv1,TLSv1.1,TLSv1.2,TLSv1.3 │ │ │ (OpenSSL 1.1.1 or higher) │ │ │ TLSv1,TLSv1.1,TLSv1.2 │ │ │ (otherwise) │ └────────────────────┴───────────────────────────────┘ The permissible TLS protocols for encrypted connections. The value is a list of one or more comma-separated protocol names. The protocols that can be named for this option depend on the SSL library used to compile MySQL. For details, see Section 6.3.2, “Encrypted Connection TLS Protocols and Ciphers”. • --use-default ┌────────────────────┬───────────────┐ │Command-Line Format │ --use-default │ ├────────────────────┼───────────────┤ │Type │ Boolean │ └────────────────────┴───────────────┘ Execute noninteractively. This option can be used for unattended installation operations. • --user=user_name, -u user_name ┌────────────────────┬──────────────────┐ │Command-Line Format │ --user=user_name │ ├────────────────────┼──────────────────┤ │Type │ String │ └────────────────────┴──────────────────┘ The user name of the MySQL account to use for connecting to the server. COPYRIGHT Copyright © 1997, 2023, Oracle and/or its affiliates. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. SEE ALSO For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. AUTHOR Oracle Corporation (http://dev.mysql.com/). MySQL 8.3 11/23/2023 MYSQL_SECURE_INSTALLATION(1)
|
mysql_secure_installation - improve MySQL installation security
|
mysql_secure_installation
| null | null |
tqdm
| null | null | null | null | null |
ahost
|
Look up the DNS A or AAAA record associated with HOST (a hostname or an IP address). This utility comes with the c-ares asynchronous resolver library.
|
ahost - print the A or AAAA record associated with a hostname or IP address
|
ahost [OPTION]... HOST...
|
-d Print some extra debugging output. -h, -? Display this help and exit. -t type If type is "a", print the A record. If type is "aaaa", print the AAAA record. If type is "u", look for both AAAA and A records (default). -s server Set the server list to use for DNS lookups. -D domain Specify the domain to search instead of using the default values from /etc/resolv.conf. This option only has an effect on platforms that use /etc/resolv.conf for DNS configuration; it has no effect on other platforms (such as Win32 or Android). REPORTING BUGS Report bugs to the c-ares mailing list: https://lists.haxx.se/listinfo/c-ares SEE ALSO adig(1) c-ares utilities April 2011 AHOST(1)
| null |
gettext
|
The gettext program translates a natural language message into the user's language, by looking up the translation in a message catalog. Display native language translation of a textual message. -d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN -c, --context=CONTEXT specify context for MSGID -e enable expansion of some escape sequences -n suppress trailing newline -E (ignored for compatibility) [TEXTDOMAIN] MSGID retrieve translated message corresponding to MSGID from TEXTDOMAIN Informative output: -h, --help display this help and exit -V, --version display version information and exit If the TEXTDOMAIN parameter is not given, the domain is determined from the environment variable TEXTDOMAIN. If the message catalog is not found in the regular directory, another location can be specified with the environment variable TEXTDOMAINDIR. When used with the -s option the program behaves like the 'echo' command. But it does not simply copy its arguments to stdout. Instead those messages found in the selected catalog are translated. Standard search directory: /opt/homebrew/Cellar/gettext/0.22.5/share/locale AUTHOR Written by Ulrich Drepper. REPORTING BUGS Report bugs in the bug tracker at <https://savannah.gnu.org/projects/gettext> or by email to <bug-gettext@gnu.org>. COPYRIGHT Copyright © 1995-2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO The full documentation for gettext is maintained as a Texinfo manual. If the info and gettext programs are properly installed at your site, the command info gettext should give you access to the complete manual. GNU gettext-runtime 0.22.5 February 2024 GETTEXT(1)
|
gettext - translate message
|
gettext [OPTION] [[TEXTDOMAIN] MSGID] gettext [OPTION] -s [MSGID]...
| null | null |
hmac_demo
| null | null | null | null | null |
gtester-report
| null | null | null | null | null |
murge
| null | null | null | null | null |
optuna
| null | null | null | null | null |
gshuf
|
Write a random permutation of the input lines to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -e, --echo treat each ARG as an input line -i, --input-range=LO-HI treat each number LO through HI as an input line -n, --head-count=COUNT output at most COUNT lines -o, --output=FILE write result to FILE instead of standard output --random-source=FILE get random bytes from FILE -r, --repeat output lines can be repeated -z, --zero-terminated line delimiter is NUL, not newline --help display this help and exit --version output version information and exit AUTHOR Written by Paul Eggert. REPORTING BUGS GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Report any translation bugs to <https://translationproject.org/team/> COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO Full documentation <https://www.gnu.org/software/coreutils/shuf> or available locally via: info '(coreutils) shuf invocation' GNU coreutils 9.3 April 2023 SHUF(1)
|
shuf - generate random permutations
|
shuf [OPTION]... [FILE] shuf -e [OPTION]... [ARG]... shuf -i LO-HI [OPTION]...
| null | null |
markdown-it
| null | null | null | null | null |
gfmt
|
Reformat each paragraph in the FILE(s), writing to standard output. The option -WIDTH is an abbreviated form of --width=DIGITS. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -c, --crown-margin preserve indentation of first two lines -p, --prefix=STRING reformat only lines beginning with STRING, reattaching the prefix to reformatted lines -s, --split-only split long lines, but do not refill -t, --tagged-paragraph indentation of first line different from second -u, --uniform-spacing one space between words, two after sentences -w, --width=WIDTH maximum line width (default of 75 columns) -g, --goal=WIDTH goal width (default of 93% of width) --help display this help and exit --version output version information and exit AUTHOR Written by Ross Paterson. REPORTING BUGS GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Report any translation bugs to <https://translationproject.org/team/> COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO Full documentation <https://www.gnu.org/software/coreutils/fmt> or available locally via: info '(coreutils) fmt invocation' GNU coreutils 9.3 April 2023 FMT(1)
|
fmt - simple optimal text formatter
|
fmt [-WIDTH] [OPTION]... [FILE]...
| null | null |
pip3.11
| null | null | null | null | null |
huggingface-cli
| null | null | null | null | null |
glibtoolize
|
Prepare a package to use libtool.
|
libtoolize - manual page for libtoolize 2.4.7
|
libtoolize [OPTION]...
|
-c, --copy copy files rather than symlinking them --debug enable verbose shell tracing -n, --dry-run print commands rather than running them -f, --force replace existing files -i, --install copy missing auxiliary files --ltdl[=DIR] install libltdl sources [default: libltdl] --no-warnings equivalent to '-Wnone' --nonrecursive prepare ltdl for non-recursive make -q, --quiet work silently --recursive prepare ltdl for recursive make --subproject prepare ltdl to configure and build independently -v, --verbose verbosely report processing --version print version information and exit -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help print short or long help message Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors 'environment' show warnings about LIBTOOLIZE_OPTIONS content 'file' show warnings about file copying and linking The following space or comma delimited options can be passed to libtoolize via the environment variable LIBTOOLIZE_OPTIONS, unknown environment options are ignored: --debug enable verbose shell tracing --no-warnings don't display warning messages --quiet work silently --verbose verbosely report processing You must 'cd' to the top directory of your package before you run 'libtoolize'. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: x86_64-pc-linux-gnu version: libtoolize (GNU libtool) 2.4.7 automake: automake (GNU automake) 1.16.3 autoconf: autoconf (GNU Autoconf) 2.69 AUTHOR Written by Gary V. Vaughan <gary@gnu.org>, 2003 REPORTING BUGS Report bugs to <bug-libtool@gnu.org>. GNU libtool home page: <http://www.gnu.org/software/libtool/>. General help using GNU software: <http://www.gnu.org/gethelp/>. COPYRIGHT Copyright © 2022 Free Software Foundation, Inc. SEE ALSO The full documentation for libtoolize is maintained as a Texinfo manual. If the info and libtoolize programs are properly installed at your site, the command info libtoolize should give you access to the complete manual. GNU libtool 2.4.7 March 2022 LIBTOOLIZE(1)
| null |
gcov-dump-13
|
gcov-dump is a tool you can use in conjunction with GCC to dump content of gcda and gcno profile files offline.
|
gcov-dump - offline gcda and gcno profile dump tool
|
gcov-dump [-v|--version] [-h|--help] [-l|--long] [-p|--positions] [-r|--raw] [-s|--stable] gcovfiles
|
-h --help Display help about using gcov-dump (on the standard output), and exit without doing any further processing. -l --long Dump content of records. -p --positions Dump positions of records. -r --raw Print content records in raw format. -s --stable Print content in stable format usable for comparison. -v --version Display the gcov-dump version number (on the standard output), and exit without doing any further processing. COPYRIGHT Copyright (c) 2017-2023 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "Funding Free Software", the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the gfdl(7) man page. (a) The FSF's Front-Cover Text is: A GNU Manual (b) The FSF's Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. gcc-13.2.0 2023-07-27 GCOV-DUMP(1)
| null |
gettext.sh
| null | null | null | null | null |
ctest
| null | null | null | null | null |
aclocal-1.16
|
Generate 'aclocal.m4' by scanning 'configure.ac' or 'configure.in'
|
aclocal - manual page for aclocal 1.16.5
|
aclocal [OPTION]...
|
--automake-acdir=DIR directory holding automake-provided m4 files --system-acdir=DIR directory holding third-party system-wide files --diff[=COMMAND] run COMMAND [diff -u] on M4 files that would be changed (implies --install and --dry-run) --dry-run pretend to, but do not actually update any file --force always update output file --help print this help, then exit -I DIR add directory to search list for .m4 files --install copy third-party files to the first -I directory --output=FILE put output in FILE (default aclocal.m4) --print-ac-dir print name of directory holding system-wide third-party m4 files, then exit --verbose don't be silent --version print version number, then exit -W, --warnings=CATEGORY report the warnings falling in CATEGORY Warning categories include: cross cross compilation issues gnu GNU coding standards (default in gnu and gnits modes) obsolete obsolete features or constructions (default) override user redefinitions of Automake rules or variables portability portability issues (default in gnu and gnits modes) portability-recursive nested Make variables (default with -Wportability) extra-portability extra portability issues related to obscure tools syntax dubious syntactic constructs (default) unsupported unsupported or incomplete features (default) all all the warnings no-CATEGORY turn off warnings in CATEGORY none turn off all the warnings error treat warnings as errors AUTHOR Written by Tom Tromey <tromey@redhat.com> and Alexandre Duret-Lutz <adl@gnu.org>. REPORTING BUGS Report bugs to <bug-automake@gnu.org>. GNU Automake home page: <https://www.gnu.org/software/automake/>. General help using GNU software: <https://www.gnu.org/gethelp/>. COPYRIGHT Copyright © 2021 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl-2.0.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO The full documentation for aclocal is maintained as a Texinfo manual. If the info and aclocal programs are properly installed at your site, the command info aclocal should give you access to the complete manual. GNU automake 1.16.5 October 2021 ACLOCAL(1)
| null |
rsa_verify_pss
| null | null | null | null | null |
gfortran-13
|
The gfortran command supports all the options supported by the gcc command. Only options specific to GNU Fortran are documented here. All GCC and GNU Fortran options are accepted both by gfortran and by gcc (as well as any other drivers built at the same time, such as g++), since adding GNU Fortran to the GCC distribution enables acceptance of GNU Fortran options by all of the relevant drivers. In some cases, options have positive and negative forms; the negative form of -ffoo would be -fno-foo. This manual documents only one of these two forms, whichever one is not the default.
|
gfortran - GNU Fortran compiler
|
gfortran [-c|-S|-E] [-g] [-pg] [-Olevel] [-Wwarn...] [-pedantic] [-Idir...] [-Ldir...] [-Dmacro[=defn]...] [-Umacro] [-foption...] [-mmachine-option...] [-o outfile] infile... Only the most useful options are listed here; see below for the remainder.
|
Here is a summary of all the options specific to GNU Fortran, grouped by type. Explanations are in the following sections. Fortran Language Options -fall-intrinsics -fallow-argument-mismatch -fallow-invalid-boz -fbackslash -fcray-pointer -fd-lines-as-code -fd-lines-as-comments -fdec -fdec-char-conversions -fdec-structure -fdec-intrinsic-ints -fdec-static -fdec-math -fdec-include -fdec-format-defaults -fdec-blank-format-item -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 -fdefault-real-10 -fdefault-real-16 -fdollar-ok -ffixed-line-length-n -ffixed-line-length-none -fpad-source -ffree-form -ffree-line-length-n -ffree-line-length-none -fimplicit-none -finteger-4-integer-8 -fmax-identifier-length -fmodule-private -ffixed-form -fno-range-check -fopenacc -fopenmp -freal-4-real-10 -freal-4-real-16 -freal-4-real-8 -freal-8-real-10 -freal-8-real-16 -freal-8-real-4 -std=std -ftest-forall-temp Preprocessing Options -A-question[=answer] -Aquestion=answer -C -CC -Dmacro[=defn] -H -P -Umacro -cpp -dD -dI -dM -dN -dU -fworking-directory -imultilib dir -iprefix file -iquote -isysroot dir -isystem dir -nocpp -nostdinc -undef Error and Warning Options -Waliasing -Wall -Wampersand -Warray-bounds -Wc-binding-type -Wcharacter-truncation -Wconversion -Wdo-subscript -Wfunction-elimination -Wimplicit-interface -Wimplicit-procedure -Wintrinsic-shadow -Wuse-without-only -Wintrinsics-std -Wline-truncation -Wno-align-commons -Wno-overwrite-recursive -Wno-tabs -Wreal-q-constant -Wsurprising -Wunderflow -Wunused-parameter -Wrealloc-lhs -Wrealloc-lhs-all -Wfrontend-loop-interchange -Wtarget-lifetime -fmax-errors=n -fsyntax-only -pedantic -pedantic-errors Debugging Options -fbacktrace -fdump-fortran-optimized -fdump-fortran-original -fdebug-aux-vars -fdump-fortran-global -fdump-parse-tree -ffpe-trap=list -ffpe-summary=list Directory Options -Idir -Jdir -fintrinsic-modules-path dir Link Options -static-libgfortran -static-libquadmath Runtime Options -fconvert=conversion -fmax-subrecord-length=length -frecord-marker=length -fsign-zero Interoperability Options -fc-prototypes -fc-prototypes-external Code Generation Options -faggressive-function-elimination -fblas-matmul-limit=n -fbounds-check -ftail-call-workaround -ftail-call-workaround=n -fcheck-array-temporaries -fcheck=<all|array-temps|bits|bounds|do|mem|pointer|recursion> -fcoarray=<none|single|lib> -fexternal-blas -ff2c -ffrontend-loop-interchange -ffrontend-optimize -finit-character=n -finit-integer=n -finit-local-zero -finit-derived -finit-logical=<true|false> -finit-real=<zero|inf|-inf|nan|snan> -finline-matmul-limit=n -finline-arg-packing -fmax-array-constructor=n -fmax-stack-var-size=n -fno-align-commons -fno-automatic -fno-protect-parens -fno-underscoring -fsecond-underscore -fpack-derived -frealloc-lhs -frecursive -frepack-arrays -fshort-enums -fstack-arrays Options controlling Fortran dialect The following options control the details of the Fortran dialect accepted by the compiler: -ffree-form -ffixed-form Specify the layout used by the source file. The free form layout was introduced in Fortran 90. Fixed form was traditionally used in older Fortran programs. When neither option is specified, the source form is determined by the file extension. -fall-intrinsics This option causes all intrinsic procedures (including the GNU- specific extensions) to be accepted. This can be useful with -std= to force standard-compliance but get access to the full range of intrinsics available with gfortran. As a consequence, -Wintrinsics-std will be ignored and no user-defined procedure with the same name as any intrinsic will be called except when it is explicitly declared "EXTERNAL". -fallow-argument-mismatch Some code contains calls to external procedures with mismatches between the calls and the procedure definition, or with mismatches between different calls. Such code is non-conforming, and will usually be flagged with an error. This options degrades the error to a warning, which can only be disabled by disabling all warnings via -w. Only a single occurrence per argument is flagged by this warning. -fallow-argument-mismatch is implied by -std=legacy. Using this option is strongly discouraged. It is possible to provide standard-conforming code which allows different types of arguments by using an explicit interface and TYPE(*). -fallow-invalid-boz A BOZ literal constant can occur in a limited number of contexts in standard conforming Fortran. This option degrades an error condition to a warning, and allows a BOZ literal constant to appear where the Fortran standard would otherwise prohibit its use. -fd-lines-as-code -fd-lines-as-comments Enable special treatment for lines beginning with "d" or "D" in fixed form sources. If the -fd-lines-as-code option is given they are treated as if the first column contained a blank. If the -fd-lines-as-comments option is given, they are treated as comment lines. -fdec DEC compatibility mode. Enables extensions and other features that mimic the default behavior of older compilers (such as DEC). These features are non-standard and should be avoided at all costs. For details on GNU Fortran's implementation of these extensions see the full documentation. Other flags enabled by this switch are: -fdollar-ok -fcray-pointer -fdec-char-conversions -fdec-structure -fdec-intrinsic-ints -fdec-static -fdec-math -fdec-include -fdec-blank-format-item -fdec-format-defaults If -fd-lines-as-code/-fd-lines-as-comments are unset, then -fdec also sets -fd-lines-as-comments. -fdec-char-conversions Enable the use of character literals in assignments and "DATA" statements for non-character variables. -fdec-structure Enable DEC "STRUCTURE" and "RECORD" as well as "UNION", "MAP", and dot ('.') as a member separator (in addition to '%'). This is provided for compatibility only; Fortran 90 derived types should be used instead where possible. -fdec-intrinsic-ints Enable B/I/J/K kind variants of existing integer functions (e.g. BIAND, IIAND, JIAND, etc...). For a complete list of intrinsics see the full documentation. -fdec-math Enable legacy math intrinsics such as COTAN and degree-valued trigonometric functions (e.g. TAND, ATAND, etc...) for compatability with older code. -fdec-static Enable DEC-style STATIC and AUTOMATIC attributes to explicitly specify the storage of variables and other objects. -fdec-include Enable parsing of INCLUDE as a statement in addition to parsing it as INCLUDE line. When parsed as INCLUDE statement, INCLUDE does not have to be on a single line and can use line continuations. -fdec-format-defaults Enable format specifiers F, G and I to be used without width specifiers, default widths will be used instead. -fdec-blank-format-item Enable a blank format item at the end of a format specification i.e. nothing following the final comma. -fdollar-ok Allow $ as a valid non-first character in a symbol name. Symbols that start with $ are rejected since it is unclear which rules to apply to implicit typing as different vendors implement different rules. Using $ in "IMPLICIT" statements is also rejected. -fbackslash Change the interpretation of backslashes in string literals from a single backslash character to "C-style" escape characters. The following combinations are expanded "\a", "\b", "\f", "\n", "\r", "\t", "\v", "\\", and "\0" to the ASCII characters alert, backspace, form feed, newline, carriage return, horizontal tab, vertical tab, backslash, and NUL, respectively. Additionally, "\x"nn, "\u"nnnn and "\U"nnnnnnnn (where each n is a hexadecimal digit) are translated into the Unicode characters corresponding to the specified code points. All other combinations of a character preceded by \ are unexpanded. -fmodule-private Set the default accessibility of module entities to "PRIVATE". Use-associated entities will not be accessible unless they are explicitly declared as "PUBLIC". -ffixed-line-length-n Set column after which characters are ignored in typical fixed-form lines in the source file, and, unless "-fno-pad-source", through which spaces are assumed (as if padded to that length) after the ends of short fixed-form lines. Popular values for n include 72 (the standard and the default), 80 (card image), and 132 (corresponding to "extended-source" options in some popular compilers). n may also be none, meaning that the entire line is meaningful and that continued character constants never have implicit spaces appended to them to fill out the line. -ffixed-line-length-0 means the same thing as -ffixed-line-length-none. -fno-pad-source By default fixed-form lines have spaces assumed (as if padded to that length) after the ends of short fixed-form lines. This is not done either if -ffixed-line-length-0, -ffixed-line-length-none or if -fno-pad-source option is used. With any of those options continued character constants never have implicit spaces appended to them to fill out the line. -ffree-line-length-n Set column after which characters are ignored in typical free-form lines in the source file. The default value is 132. n may be none, meaning that the entire line is meaningful. -ffree-line-length-0 means the same thing as -ffree-line-length-none. -fmax-identifier-length=n Specify the maximum allowed identifier length. Typical values are 31 (Fortran 95) and 63 (Fortran 2003 and later). -fimplicit-none Specify that no implicit typing is allowed, unless overridden by explicit "IMPLICIT" statements. This is the equivalent of adding "implicit none" to the start of every procedure. -fcray-pointer Enable the Cray pointer extension, which provides C-like pointer functionality. -fopenacc Enable the OpenACC extensions. This includes OpenACC "!$acc" directives in free form and "c$acc", *$acc and "!$acc" directives in fixed form, "!$" conditional compilation sentinels in free form and "c$", "*$" and "!$" sentinels in fixed form, and when linking arranges for the OpenACC runtime library to be linked in. -fopenmp Enable the OpenMP extensions. This includes OpenMP "!$omp" directives in free form and "c$omp", *$omp and "!$omp" directives in fixed form, "!$" conditional compilation sentinels in free form and "c$", "*$" and "!$" sentinels in fixed form, and when linking arranges for the OpenMP runtime library to be linked in. The option -fopenmp implies -frecursive. -fno-range-check Disable range checking on results of simplification of constant expressions during compilation. For example, GNU Fortran will give an error at compile time when simplifying "a = 1. / 0". With this option, no error will be given and "a" will be assigned the value "+Infinity". If an expression evaluates to a value outside of the relevant range of ["-HUGE()":"HUGE()"], then the expression will be replaced by "-Inf" or "+Inf" as appropriate. Similarly, "DATA i/Z'FFFFFFFF'/" will result in an integer overflow on most systems, but with -fno-range-check the value will "wrap around" and "i" will be initialized to -1 instead. -fdefault-integer-8 Set the default integer and logical types to an 8 byte wide type. This option also affects the kind of integer constants like 42. Unlike -finteger-4-integer-8, it does not promote variables with explicit kind declaration. -fdefault-real-8 Set the default real type to an 8 byte wide type. This option also affects the kind of non-double real constants like 1.0. This option promotes the default width of "DOUBLE PRECISION" and double real constants like "1.d0" to 16 bytes if possible. If "-fdefault-double-8" is given along with "fdefault-real-8", "DOUBLE PRECISION" and double real constants are not promoted. Unlike -freal-4-real-8, "fdefault-real-8" does not promote variables with explicit kind declarations. -fdefault-real-10 Set the default real type to an 10 byte wide type. This option also affects the kind of non-double real constants like 1.0. This option promotes the default width of "DOUBLE PRECISION" and double real constants like "1.d0" to 16 bytes if possible. If "-fdefault-double-8" is given along with "fdefault-real-10", "DOUBLE PRECISION" and double real constants are not promoted. Unlike -freal-4-real-10, "fdefault-real-10" does not promote variables with explicit kind declarations. -fdefault-real-16 Set the default real type to an 16 byte wide type. This option also affects the kind of non-double real constants like 1.0. This option promotes the default width of "DOUBLE PRECISION" and double real constants like "1.d0" to 16 bytes if possible. If "-fdefault-double-8" is given along with "fdefault-real-16", "DOUBLE PRECISION" and double real constants are not promoted. Unlike -freal-4-real-16, "fdefault-real-16" does not promote variables with explicit kind declarations. -fdefault-double-8 Set the "DOUBLE PRECISION" type and double real constants like "1.d0" to an 8 byte wide type. Do nothing if this is already the default. This option prevents -fdefault-real-8, -fdefault-real-10, and -fdefault-real-16, from promoting "DOUBLE PRECISION" and double real constants like "1.d0" to 16 bytes. -finteger-4-integer-8 Promote all "INTEGER(KIND=4)" entities to an "INTEGER(KIND=8)" entities. If "KIND=8" is unavailable, then an error will be issued. This option should be used with care and may not be suitable for your codes. Areas of possible concern include calls to external procedures, alignment in "EQUIVALENCE" and/or "COMMON", generic interfaces, BOZ literal constant conversion, and I/O. Inspection of the intermediate representation of the translated Fortran code, produced by -fdump-tree-original, is suggested. -freal-4-real-8 -freal-4-real-10 -freal-4-real-16 -freal-8-real-4 -freal-8-real-10 -freal-8-real-16 Promote all "REAL(KIND=M)" entities to "REAL(KIND=N)" entities. If "REAL(KIND=N)" is unavailable, then an error will be issued. The "-freal-4-" flags also affect the default real kind and the "-freal-8-" flags also the double-precision real kind. All other real-kind types are unaffected by this option. The promotion is also applied to real literal constants of default and double- precision kind and a specified kind number of 4 or 8, respectively. However, "-fdefault-real-8", "-fdefault-real-10", "-fdefault-real-10", and "-fdefault-double-8" take precedence for the default and double-precision real kinds, both for real literal constants and for declarations without a kind number. Note that for "REAL(KIND=KIND(1.0))" the literal may get promoted and then the result may get promoted again. These options should be used with care and may not be suitable for your codes. Areas of possible concern include calls to external procedures, alignment in "EQUIVALENCE" and/or "COMMON", generic interfaces, BOZ literal constant conversion, and I/O and calls to intrinsic procedures when passing a value to the "kind=" dummy argument. Inspection of the intermediate representation of the translated Fortran code, produced by -fdump-fortran-original or -fdump-tree-original, is suggested. -std=std Specify the standard to which the program is expected to conform, which may be one of f95, f2003, f2008, f2018, gnu, or legacy. The default value for std is gnu, which specifies a superset of the latest Fortran standard that includes all of the extensions supported by GNU Fortran, although warnings will be given for obsolete extensions not recommended for use in new code. The legacy value is equivalent but without the warnings for obsolete extensions, and may be useful for old non-standard programs. The f95, f2003, f2008, and f2018 values specify strict conformance to the Fortran 95, Fortran 2003, Fortran 2008 and Fortran 2018 standards, respectively; errors are given for all extensions beyond the relevant language standard, and warnings are given for the Fortran 77 features that are permitted but obsolescent in later standards. The deprecated option -std=f2008ts acts as an alias for -std=f2018. It is only present for backwards compatibility with earlier gfortran versions and should not be used any more. -ftest-forall-temp Enhance test coverage by forcing most forall assignments to use temporary. Enable and customize preprocessing Many Fortran compilers including GNU Fortran allow passing the source code through a C preprocessor (CPP; sometimes also called the Fortran preprocessor, FPP) to allow for conditional compilation. In the case of GNU Fortran, this is the GNU C Preprocessor in the traditional mode. On systems with case-preserving file names, the preprocessor is automatically invoked if the filename extension is .F, .FOR, .FTN, .fpp, .FPP, .F90, .F95, .F03 or .F08. To manually invoke the preprocessor on any file, use -cpp, to disable preprocessing on files where the preprocessor is run automatically, use -nocpp. If a preprocessed file includes another file with the Fortran "INCLUDE" statement, the included file is not preprocessed. To preprocess included files, use the equivalent preprocessor statement "#include". If GNU Fortran invokes the preprocessor, "__GFORTRAN__" is defined. The macros "__GNUC__", "__GNUC_MINOR__" and "__GNUC_PATCHLEVEL__" can be used to determine the version of the compiler. See Top,,Overview,cpp,The C Preprocessor for details. GNU Fortran supports a number of "INTEGER" and "REAL" kind types in additional to the kind types required by the Fortran standard. The availability of any given kind type is architecture dependent. The following pre-defined preprocessor macros can be used to conditionally include code for these additional kind types: "__GFC_INT_1__", "__GFC_INT_2__", "__GFC_INT_8__", "__GFC_INT_16__", "__GFC_REAL_10__", and "__GFC_REAL_16__". While CPP is the de-facto standard for preprocessing Fortran code, Part 3 of the Fortran 95 standard (ISO/IEC 1539-3:1998) defines Conditional Compilation, which is not widely used and not directly supported by the GNU Fortran compiler. You can use the program coco to preprocess such files (<http://www.daniellnagle.com/coco.html>). The following options control preprocessing of Fortran code: -cpp -nocpp Enable preprocessing. The preprocessor is automatically invoked if the file extension is .fpp, .FPP, .F, .FOR, .FTN, .F90, .F95, .F03 or .F08. Use this option to manually enable preprocessing of any kind of Fortran file. To disable preprocessing of files with any of the above listed extensions, use the negative form: -nocpp. The preprocessor is run in traditional mode. Any restrictions of the file-format, especially the limits on line length, apply for preprocessed output as well, so it might be advisable to use the -ffree-line-length-none or -ffixed-line-length-none options. -dM Instead of the normal output, generate a list of '#define' directives for all the macros defined during the execution of the preprocessor, including predefined macros. This gives you a way of finding out what is predefined in your version of the preprocessor. Assuming you have no file foo.f90, the command touch foo.f90; gfortran -cpp -E -dM foo.f90 will show all the predefined macros. -dD Like -dM except in two respects: it does not include the predefined macros, and it outputs both the "#define" directives and the result of preprocessing. Both kinds of output go to the standard output file. -dN Like -dD, but emit only the macro names, not their expansions. -dU Like dD except that only macros that are expanded, or whose definedness is tested in preprocessor directives, are output; the output is delayed until the use or test of the macro; and '#undef' directives are also output for macros tested but undefined at the time. -dI Output '#include' directives in addition to the result of preprocessing. -fworking-directory Enable generation of linemarkers in the preprocessor output that will let the compiler know the current working directory at the time of preprocessing. When this option is enabled, the preprocessor will emit, after the initial linemarker, a second linemarker with the current working directory followed by two slashes. GCC will use this directory, when it is present in the preprocessed input, as the directory emitted as the current working directory in some debugging information formats. This option is implicitly enabled if debugging information is enabled, but this can be inhibited with the negated form -fno-working-directory. If the -P flag is present in the command line, this option has no effect, since no "#line" directives are emitted whatsoever. -idirafter dir Search dir for include files, but do it after all directories specified with -I and the standard system directories have been exhausted. dir is treated as a system include directory. If dir begins with "=", then the "=" will be replaced by the sysroot prefix; see --sysroot and -isysroot. -imultilib dir Use dir as a subdirectory of the directory containing target- specific C++ headers. -iprefix prefix Specify prefix as the prefix for subsequent -iwithprefix options. If the prefix represents a directory, you should include the final '/'. -isysroot dir This option is like the --sysroot option, but applies only to header files. See the --sysroot option for more information. -iquote dir Search dir only for header files requested with "#include "file""; they are not searched for "#include <file>", before all directories specified by -I and before the standard system directories. If dir begins with "=", then the "=" will be replaced by the sysroot prefix; see --sysroot and -isysroot. -isystem dir Search dir for header files, after all directories specified by -I but before the standard system directories. Mark it as a system directory, so that it gets the same special treatment as is applied to the standard system directories. If dir begins with "=", then the "=" will be replaced by the sysroot prefix; see --sysroot and -isysroot. -nostdinc Do not search the standard system directories for header files. Only the directories you have specified with -I options (and the directory of the current file, if appropriate) are searched. -undef Do not predefine any system-specific or GCC-specific macros. The standard predefined macros remain defined. -Apredicate=answer Make an assertion with the predicate predicate and answer answer. This form is preferred to the older form -A predicate(answer), which is still supported, because it does not use shell special characters. -A-predicate=answer Cancel an assertion with the predicate predicate and answer answer. -C Do not discard comments. All comments are passed through to the output file, except for comments in processed directives, which are deleted along with the directive. You should be prepared for side effects when using -C; it causes the preprocessor to treat comments as tokens in their own right. For example, comments appearing at the start of what would be a directive line have the effect of turning that line into an ordinary source line, since the first token on the line is no longer a '#'. Warning: this currently handles C-Style comments only. The preprocessor does not yet recognize Fortran-style comments. -CC Do not discard comments, including during macro expansion. This is like -C, except that comments contained within macros are also passed through to the output file where the macro is expanded. In addition to the side-effects of the -C option, the -CC option causes all C++-style comments inside a macro to be converted to C-style comments. This is to prevent later use of that macro from inadvertently commenting out the remainder of the source line. The -CC option is generally used to support lint comments. Warning: this currently handles C- and C++-Style comments only. The preprocessor does not yet recognize Fortran-style comments. -Dname Predefine name as a macro, with definition 1. -Dname=definition The contents of definition are tokenized and processed as if they appeared during translation phase three in a '#define' directive. In particular, the definition will be truncated by embedded newline characters. If you are invoking the preprocessor from a shell or shell-like program you may need to use the shell's quoting syntax to protect characters such as spaces that have a meaning in the shell syntax. If you wish to define a function-like macro on the command line, write its argument list with surrounding parentheses before the equals sign (if any). Parentheses are meaningful to most shells, so you will need to quote the option. With sh and csh, "-D'name(args...)=definition'" works. -D and -U options are processed in the order they are given on the command line. All -imacros file and -include file options are processed after all -D and -U options. -H Print the name of each header file used, in addition to other normal activities. Each name is indented to show how deep in the '#include' stack it is. -P Inhibit generation of linemarkers in the output from the preprocessor. This might be useful when running the preprocessor on something that is not C code, and will be sent to a program which might be confused by the linemarkers. -Uname Cancel any previous definition of name, either built in or provided with a -D option. Options to request or suppress errors and warnings Errors are diagnostic messages that report that the GNU Fortran compiler cannot compile the relevant piece of source code. The compiler will continue to process the program in an attempt to report further errors to aid in debugging, but will not produce any compiled output. Warnings are diagnostic messages that report constructions which are not inherently erroneous but which are risky or suggest there is likely to be a bug in the program. Unless -Werror is specified, they do not prevent compilation of the program. You can request many specific warnings with options beginning -W, for example -Wimplicit to request warnings on implicit declarations. Each of these specific warning options also has a negative form beginning -Wno- to turn off warnings; for example, -Wno-implicit. This manual lists only one of the two forms, whichever is not the default. These options control the amount and kinds of errors and warnings produced by GNU Fortran: -fmax-errors=n Limits the maximum number of error messages to n, at which point GNU Fortran bails out rather than attempting to continue processing the source code. If n is 0, there is no limit on the number of error messages produced. -fsyntax-only Check the code for syntax errors, but do not actually compile it. This will generate module files for each module present in the code, but no other output file. -Wpedantic -pedantic Issue warnings for uses of extensions to Fortran. -pedantic also applies to C-language constructs where they occur in GNU Fortran source files, such as use of \e in a character constant within a directive like "#include". Valid Fortran programs should compile properly with or without this option. However, without this option, certain GNU extensions and traditional Fortran features are supported as well. With this option, many of them are rejected. Some users try to use -pedantic to check programs for conformance. They soon find that it does not do quite what they want---it finds some nonstandard practices, but not all. However, improvements to GNU Fortran in this area are welcome. This should be used in conjunction with -std=f95, -std=f2003, -std=f2008 or -std=f2018. -pedantic-errors Like -pedantic, except that errors are produced rather than warnings. -Wall Enables commonly used warning options pertaining to usage that we recommend avoiding and that we believe are easy to avoid. This currently includes -Waliasing, -Wampersand, -Wconversion, -Wsurprising, -Wc-binding-type, -Wintrinsics-std, -Wtabs, -Wintrinsic-shadow, -Wline-truncation, -Wtarget-lifetime, -Winteger-division, -Wreal-q-constant, -Wunused and -Wundefined-do-loop. -Waliasing Warn about possible aliasing of dummy arguments. Specifically, it warns if the same actual argument is associated with a dummy argument with "INTENT(IN)" and a dummy argument with "INTENT(OUT)" in a call with an explicit interface. The following example will trigger the warning. interface subroutine bar(a,b) integer, intent(in) :: a integer, intent(out) :: b end subroutine end interface integer :: a call bar(a,a) -Wampersand Warn about missing ampersand in continued character constants. The warning is given with -Wampersand, -pedantic, -std=f95, -std=f2003, -std=f2008 and -std=f2018. Note: With no ampersand given in a continued character constant, GNU Fortran assumes continuation at the first non-comment, non-whitespace character after the ampersand that initiated the continuation. -Warray-temporaries Warn about array temporaries generated by the compiler. The information generated by this warning is sometimes useful in optimization, in order to avoid such temporaries. -Wc-binding-type Warn if the a variable might not be C interoperable. In particular, warn if the variable has been declared using an intrinsic type with default kind instead of using a kind parameter defined for C interoperability in the intrinsic "ISO_C_Binding" module. This option is implied by -Wall. -Wcharacter-truncation Warn when a character assignment will truncate the assigned string. -Wline-truncation Warn when a source code line will be truncated. This option is implied by -Wall. For free-form source code, the default is -Werror=line-truncation such that truncations are reported as error. -Wconversion Warn about implicit conversions that are likely to change the value of the expression after conversion. Implied by -Wall. -Wconversion-extra Warn about implicit conversions between different types and kinds. This option does not imply -Wconversion. -Wextra Enables some warning options for usages of language features which may be problematic. This currently includes -Wcompare-reals, -Wunused-parameter and -Wdo-subscript. -Wfrontend-loop-interchange Warn when using -ffrontend-loop-interchange for performing loop interchanges. -Wimplicit-interface Warn if a procedure is called without an explicit interface. Note this only checks that an explicit interface is present. It does not check that the declared interfaces are consistent across program units. -Wimplicit-procedure Warn if a procedure is called that has neither an explicit interface nor has been declared as "EXTERNAL". -Winteger-division Warn if a constant integer division truncates its result. As an example, 3/5 evaluates to 0. -Wintrinsics-std Warn if gfortran finds a procedure named like an intrinsic not available in the currently selected standard (with -std) and treats it as "EXTERNAL" procedure because of this. -fall-intrinsics can be used to never trigger this behavior and always link to the intrinsic regardless of the selected standard. -Wno-overwrite-recursive Do not warn when -fno-automatic is used with -frecursive. Recursion will be broken if the relevant local variables do not have the attribute "AUTOMATIC" explicitly declared. This option can be used to suppress the warning when it is known that recursion is not broken. Useful for build environments that use -Werror. -Wreal-q-constant Produce a warning if a real-literal-constant contains a "q" exponent-letter. -Wsurprising Produce a warning when "suspicious" code constructs are encountered. While technically legal these usually indicate that an error has been made. This currently produces a warning under the following circumstances: * An INTEGER SELECT construct has a CASE that can never be matched as its lower value is greater than its upper value. * A LOGICAL SELECT construct has three CASE statements. * A TRANSFER specifies a source that is shorter than the destination. * The type of a function result is declared more than once with the same type. If -pedantic or standard-conforming mode is enabled, this is an error. * A "CHARACTER" variable is declared with negative length. * With -fopenmp, for fixed-form source code, when an "omx" vendor-extension sentinel is encountered. (The equivalent "ompx", used in free-form source code, is diagnosed by default.) -Wtabs By default, tabs are accepted as whitespace, but tabs are not members of the Fortran Character Set. For continuation lines, a tab followed by a digit between 1 and 9 is supported. -Wtabs will cause a warning to be issued if a tab is encountered. Note, -Wtabs is active for -pedantic, -std=f95, -std=f2003, -std=f2008, -std=f2018 and -Wall. -Wundefined-do-loop Warn if a DO loop with step either 1 or -1 yields an underflow or an overflow during iteration of an induction variable of the loop. This option is implied by -Wall. -Wunderflow Produce a warning when numerical constant expressions are encountered, which yield an UNDERFLOW during compilation. Enabled by default. -Wintrinsic-shadow Warn if a user-defined procedure or module procedure has the same name as an intrinsic; in this case, an explicit interface or "EXTERNAL" or "INTRINSIC" declaration might be needed to get calls later resolved to the desired intrinsic/procedure. This option is implied by -Wall. -Wuse-without-only Warn if a "USE" statement has no "ONLY" qualifier and thus implicitly imports all public entities of the used module. -Wunused-dummy-argument Warn about unused dummy arguments. This option is implied by -Wall. -Wunused-parameter Contrary to gcc's meaning of -Wunused-parameter, gfortran's implementation of this option does not warn about unused dummy arguments (see -Wunused-dummy-argument), but about unused "PARAMETER" values. -Wunused-parameter is implied by -Wextra if also -Wunused or -Wall is used. -Walign-commons By default, gfortran warns about any occasion of variables being padded for proper alignment inside a "COMMON" block. This warning can be turned off via -Wno-align-commons. See also -falign-commons. -Wfunction-elimination Warn if any calls to impure functions are eliminated by the optimizations enabled by the -ffrontend-optimize option. This option is implied by -Wextra. -Wrealloc-lhs Warn when the compiler might insert code to for allocation or reallocation of an allocatable array variable of intrinsic type in intrinsic assignments. In hot loops, the Fortran 2003 reallocation feature may reduce the performance. If the array is already allocated with the correct shape, consider using a whole-array array-spec (e.g. "(:,:,:)") for the variable on the left-hand side to prevent the reallocation check. Note that in some cases the warning is shown, even if the compiler will optimize reallocation checks away. For instance, when the right-hand side contains the same variable multiplied by a scalar. See also -frealloc-lhs. -Wrealloc-lhs-all Warn when the compiler inserts code to for allocation or reallocation of an allocatable variable; this includes scalars and derived types. -Wcompare-reals Warn when comparing real or complex types for equality or inequality. This option is implied by -Wextra. -Wtarget-lifetime Warn if the pointer in a pointer assignment might be longer than the its target. This option is implied by -Wall. -Wzerotrip Warn if a "DO" loop is known to execute zero times at compile time. This option is implied by -Wall. -Wdo-subscript Warn if an array subscript inside a DO loop could lead to an out- of-bounds access even if the compiler cannot prove that the statement is actually executed, in cases like real a(3) do i=1,4 if (condition(i)) then a(i) = 1.2 end if end do This option is implied by -Wextra. -Werror Turns all warnings into errors. Some of these have no effect when compiling programs written in Fortran. Options for debugging your program or GNU Fortran GNU Fortran has various special options that are used for debugging either your program or the GNU Fortran compiler. -fdump-fortran-original Output the internal parse tree after translating the source program into internal representation. This option is mostly useful for debugging the GNU Fortran compiler itself. The output generated by this option might change between releases. This option may also generate internal compiler errors for features which have only recently been added. -fdump-fortran-optimized Output the parse tree after front-end optimization. Mostly useful for debugging the GNU Fortran compiler itself. The output generated by this option might change between releases. This option may also generate internal compiler errors for features which have only recently been added. -fdump-parse-tree Output the internal parse tree after translating the source program into internal representation. Mostly useful for debugging the GNU Fortran compiler itself. The output generated by this option might change between releases. This option may also generate internal compiler errors for features which have only recently been added. This option is deprecated; use "-fdump-fortran-original" instead. -fdebug-aux-vars Renames internal variables created by the gfortran front end and makes them accessible to a debugger. The name of the internal variables then start with upper-case letters followed by an underscore. This option is useful for debugging the compiler's code generation together with "-fdump-tree-original" and enabling debugging of the executable program by using "-g" or "-ggdb3". -fdump-fortran-global Output a list of the global identifiers after translating into middle-end representation. Mostly useful for debugging the GNU Fortran compiler itself. The output generated by this option might change between releases. This option may also generate internal compiler errors for features which have only recently been added. -ffpe-trap=list Specify a list of floating point exception traps to enable. On most systems, if a floating point exception occurs and the trap for that exception is enabled, a SIGFPE signal will be sent and the program being aborted, producing a core file useful for debugging. list is a (possibly empty) comma-separated list of the following exceptions: invalid (invalid floating point operation, such as "SQRT(-1.0)"), zero (division by zero), overflow (overflow in a floating point operation), underflow (underflow in a floating point operation), inexact (loss of precision during operation), and denormal (operation performed on a denormal value). The first five exceptions correspond to the five IEEE 754 exceptions, whereas the last one (denormal) is not part of the IEEE 754 standard but is available on some common architectures such as x86. The first three exceptions (invalid, zero, and overflow) often indicate serious errors, and unless the program has provisions for dealing with these exceptions, enabling traps for these three exceptions is probably a good idea. If the option is used more than once in the command line, the lists will be joined: '"ffpe-trap="list1 "ffpe-trap="list2' is equivalent to "ffpe-trap="list1,list2. Note that once enabled an exception cannot be disabled (no negative form). Many, if not most, floating point operations incur loss of precision due to rounding, and hence the "ffpe-trap=inexact" is likely to be uninteresting in practice. By default no exception traps are enabled. -ffpe-summary=list Specify a list of floating-point exceptions, whose flag status is printed to "ERROR_UNIT" when invoking "STOP" and "ERROR STOP". list can be either none, all or a comma-separated list of the following exceptions: invalid, zero, overflow, underflow, inexact and denormal. (See -ffpe-trap for a description of the exceptions.) If the option is used more than once in the command line, only the last one will be used. By default, a summary for all exceptions but inexact is shown. -fno-backtrace When a serious runtime error is encountered or a deadly signal is emitted (segmentation fault, illegal instruction, bus error, floating-point exception, and the other POSIX signals that have the action core), the Fortran runtime library tries to output a backtrace of the error. "-fno-backtrace" disables the backtrace generation. This option only has influence for compilation of the Fortran main program. Options for directory search These options affect how GNU Fortran searches for files specified by the "INCLUDE" directive and where it searches for previously compiled modules. It also affects the search paths used by cpp when used to preprocess Fortran source. -Idir These affect interpretation of the "INCLUDE" directive (as well as of the "#include" directive of the cpp preprocessor). Also note that the general behavior of -I and "INCLUDE" is pretty much the same as of -I with "#include" in the cpp preprocessor, with regard to looking for header.gcc files and other such things. This path is also used to search for .mod files when previously compiled modules are required by a "USE" statement. -Jdir This option specifies where to put .mod files for compiled modules. It is also added to the list of directories to searched by an "USE" statement. The default is the current directory. -fintrinsic-modules-path dir This option specifies the location of pre-compiled intrinsic modules, if they are not in the default location expected by the compiler. Influencing the linking step These options come into play when the compiler links object files into an executable output file. They are meaningless if the compiler is not doing a link step. -static-libgfortran On systems that provide libgfortran as a shared and a static library, this option forces the use of the static version. If no shared version of libgfortran was built when the compiler was configured, this option has no effect. -static-libquadmath On systems that provide libquadmath as a shared and a static library, this option forces the use of the static version. If no shared version of libquadmath was built when the compiler was configured, this option has no effect. Please note that the libquadmath runtime library is licensed under the GNU Lesser General Public License (LGPL), and linking it statically introduces requirements when redistributing the resulting binaries. Influencing runtime behavior These options affect the runtime behavior of programs compiled with GNU Fortran. -fconvert=conversion Specify the representation of data for unformatted files. Valid values for conversion on most systems are: native, the default; swap, swap between big- and little-endian; big-endian, use big- endian representation for unformatted files; little-endian, use little-endian representation for unformatted files. On POWER systems which suppport -mabi=ieeelongdouble, there are additional options, which can be combined with others with commas. Those are @w<-fconvert=r16_ieee Use IEEE 128-bit format for> "REAL(KIND=16)". @w<-fconvert=r16_ibm Use IBM long double format for> "REAL(KIND=16)". This option has an effect only when used in the main program. The "CONVERT" specifier and the GFORTRAN_CONVERT_UNIT environment variable override the default specified by -fconvert. -frecord-marker=length Specify the length of record markers for unformatted files. Valid values for length are 4 and 8. Default is 4. This is different from previous versions of gfortran, which specified a default record marker length of 8 on most systems. If you want to read or write files compatible with earlier versions of gfortran, use -frecord-marker=8. -fmax-subrecord-length=length Specify the maximum length for a subrecord. The maximum permitted value for length is 2147483639, which is also the default. Only really useful for use by the gfortran testsuite. -fsign-zero When enabled, floating point numbers of value zero with the sign bit set are written as negative number in formatted output and treated as negative in the "SIGN" intrinsic. -fno-sign-zero does not print the negative sign of zero values (or values rounded to zero for I/O) and regards zero as positive number in the "SIGN" intrinsic for compatibility with Fortran 77. The default is -fsign-zero. Options for code generation conventions These machine-independent options control the interface conventions used in code generation. Most of them have both positive and negative forms; the negative form of -ffoo would be -fno-foo. In the table below, only one of the forms is listed---the one which is not the default. You can figure out the other form by either removing no- or adding it. -fno-automatic Treat each program unit (except those marked as RECURSIVE) as if the "SAVE" statement were specified for every local variable and array referenced in it. Does not affect common blocks. (Some Fortran compilers provide this option under the name -static or -save.) The default, which is -fautomatic, uses the stack for local variables smaller than the value given by -fmax-stack-var-size. Use the option -frecursive to use no static memory. Local variables or arrays having an explicit "SAVE" attribute are silently ignored unless the -pedantic option is added. -ff2c Generate code designed to be compatible with code generated by g77 and f2c. The calling conventions used by g77 (originally implemented in f2c) require functions that return type default "REAL" to actually return the C type "double", and functions that return type "COMPLEX" to return the values via an extra argument in the calling sequence that points to where to store the return value. Under the default GNU calling conventions, such functions simply return their results as they would in GNU C---default "REAL" functions return the C type "float", and "COMPLEX" functions return the GNU C type "complex". Additionally, this option implies the -fsecond-underscore option, unless -fno-second-underscore is explicitly requested. This does not affect the generation of code that interfaces with the libgfortran library. Caution: It is not a good idea to mix Fortran code compiled with -ff2c with code compiled with the default -fno-f2c calling conventions as, calling "COMPLEX" or default "REAL" functions between program parts which were compiled with different calling conventions will break at execution time. Caution: This will break code which passes intrinsic functions of type default "REAL" or "COMPLEX" as actual arguments, as the library implementations use the -fno-f2c calling conventions. -fno-underscoring Do not transform names of entities specified in the Fortran source file by appending underscores to them. With -funderscoring in effect, GNU Fortran appends one underscore to external names. This is done to ensure compatibility with code produced by many UNIX Fortran compilers. Caution: The default behavior of GNU Fortran is incompatible with f2c and g77, please use the -ff2c option if you want object files compiled with GNU Fortran to be compatible with object code created with these tools. Use of -fno-underscoring is not recommended unless you are experimenting with issues such as integration of GNU Fortran into existing system environments (vis-a-vis existing libraries, tools, and so on). For example, with -funderscoring, and assuming that "j()" and "max_count()" are external functions while "my_var" and "lvar" are local variables, a statement like I = J() + MAX_COUNT (MY_VAR, LVAR) is implemented as something akin to: i = j_() + max_count_(&my_var, &lvar); With -fno-underscoring, the same statement is implemented as: i = j() + max_count(&my_var, &lvar); Use of -fno-underscoring allows direct specification of user- defined names while debugging and when interfacing GNU Fortran code with other languages. Note that just because the names match does not mean that the interface implemented by GNU Fortran for an external name matches the interface implemented by some other language for that same name. That is, getting code produced by GNU Fortran to link to code produced by some other compiler using this or any other method can be only a small part of the overall solution---getting the code generated by both compilers to agree on issues other than naming can require significant effort, and, unlike naming disagreements, linkers normally cannot detect disagreements in these other areas. Also, note that with -fno-underscoring, the lack of appended underscores introduces the very real possibility that a user- defined external name will conflict with a name in a system library, which could make finding unresolved-reference bugs quite difficult in some cases---they might occur at program run time, and show up only as buggy behavior at run time. In future versions of GNU Fortran we hope to improve naming and linking issues so that debugging always involves using the names as they appear in the source, even if the names as seen by the linker are mangled to prevent accidental linking between procedures with incompatible interfaces. -fsecond-underscore By default, GNU Fortran appends an underscore to external names. If this option is used GNU Fortran appends two underscores to names with underscores and one underscore to external names with no underscores. GNU Fortran also appends two underscores to internal names with underscores to avoid naming collisions with external names. This option has no effect if -fno-underscoring is in effect. It is implied by the -ff2c option. Otherwise, with this option, an external name such as "MAX_COUNT" is implemented as a reference to the link-time external symbol "max_count__", instead of "max_count_". This is required for compatibility with g77 and f2c, and is implied by use of the -ff2c option. -fcoarray=<keyword> none Disable coarray support; using coarray declarations and image- control statements will produce a compile-time error. (Default) single Single-image mode, i.e. "num_images()" is always one. lib Library-based coarray parallelization; a suitable GNU Fortran coarray library needs to be linked. -fcheck=<keyword> Enable the generation of run-time checks; the argument shall be a comma-delimited list of the following keywords. Prefixing a check with no- disables it if it was activated by a previous specification. all Enable all run-time test of -fcheck. array-temps Warns at run time when for passing an actual argument a temporary array had to be generated. The information generated by this warning is sometimes useful in optimization, in order to avoid such temporaries. Note: The warning is only printed once per location. bits Enable generation of run-time checks for invalid arguments to the bit manipulation intrinsics. bounds Enable generation of run-time checks for array subscripts and against the declared minimum and maximum values. It also checks array indices for assumed and deferred shape arrays against the actual allocated bounds and ensures that all string lengths are equal for character array constructors without an explicit typespec. Some checks require that -fcheck=bounds is set for the compilation of the main program. Note: In the future this may also include other forms of checking, e.g., checking substring references. do Enable generation of run-time checks for invalid modification of loop iteration variables. mem Enable generation of run-time checks for memory allocation. Note: This option does not affect explicit allocations using the "ALLOCATE" statement, which will be always checked. pointer Enable generation of run-time checks for pointers and allocatables. recursion Enable generation of run-time checks for recursively called subroutines and functions which are not marked as recursive. See also -frecursive. Note: This check does not work for OpenMP programs and is disabled if used together with -frecursive and -fopenmp. Example: Assuming you have a file foo.f90, the command gfortran -fcheck=all,no-array-temps foo.f90 will compile the file with all checks enabled as specified above except warnings for generated array temporaries. -fbounds-check Deprecated alias for -fcheck=bounds. -ftail-call-workaround -ftail-call-workaround=n Some C interfaces to Fortran codes violate the gfortran ABI by omitting the hidden character length arguments as described in This can lead to crashes because pushing arguments for tail calls can overflow the stack. To provide a workaround for existing binary packages, this option disables tail call optimization for gfortran procedures with character arguments. With -ftail-call-workaround=2 tail call optimization is disabled in all gfortran procedures with character arguments, with -ftail-call-workaround=1 or equivalent -ftail-call-workaround only in gfortran procedures with character arguments that call implicitly prototyped procedures. Using this option can lead to problems including crashes due to insufficient stack space. It is very strongly recommended to fix the code in question. The -fc-prototypes-external option can be used to generate prototypes which conform to gfortran's ABI, for inclusion in the source code. Support for this option will likely be withdrawn in a future release of gfortran. The negative form, -fno-tail-call-workaround or equivalent -ftail-call-workaround=0, can be used to disable this option. Default is currently -ftail-call-workaround, this will change in future releases. -fcheck-array-temporaries Deprecated alias for -fcheck=array-temps. -fmax-array-constructor=n This option can be used to increase the upper limit permitted in array constructors. The code below requires this option to expand the array at compile time. program test implicit none integer j integer, parameter :: n = 100000 integer, parameter :: i(n) = (/ (2*j, j = 1, n) /) print '(10(I0,1X))', i end program test Caution: This option can lead to long compile times and excessively large object files. The default value for n is 65535. -fmax-stack-var-size=n This option specifies the size in bytes of the largest array that will be put on the stack; if the size is exceeded static memory is used (except in procedures marked as RECURSIVE). Use the option -frecursive to allow for recursive procedures which do not have a RECURSIVE attribute or for parallel programs. Use -fno-automatic to never use the stack. This option currently only affects local arrays declared with constant bounds, and may not apply to all character variables. Future versions of GNU Fortran may improve this behavior. The default value for n is 65536. -fstack-arrays Adding this option will make the Fortran compiler put all arrays of unknown size and array temporaries onto stack memory. If your program uses very large local arrays it is possible that you will have to extend your runtime limits for stack memory on some operating systems. This flag is enabled by default at optimization level -Ofast unless -fmax-stack-var-size is specified. -fpack-derived This option tells GNU Fortran to pack derived type members as closely as possible. Code compiled with this option is likely to be incompatible with code compiled without this option, and may execute slower. -frepack-arrays In some circumstances GNU Fortran may pass assumed shape array sections via a descriptor describing a noncontiguous area of memory. This option adds code to the function prologue to repack the data into a contiguous block at runtime. This should result in faster accesses to the array. However it can introduce significant overhead to the function call, especially when the passed data is noncontiguous. -fshort-enums This option is provided for interoperability with C code that was compiled with the -fshort-enums option. It will make GNU Fortran choose the smallest "INTEGER" kind a given enumerator set will fit in, and give all its enumerators this kind. -finline-arg-packing When passing an assumed-shape argument of a procedure as actual argument to an assumed-size or explicit size or as argument to a procedure that does not have an explicit interface, the argument may have to be packed, that is put into contiguous memory. An example is the call to "foo" in subroutine foo(a) real, dimension(*) :: a end subroutine foo subroutine bar(b) real, dimension(:) :: b call foo(b) end subroutine bar When -finline-arg-packing is in effect, this packing will be performed by inline code. This allows for more optimization while increasing code size. -finline-arg-packing is implied by any of the -O options except when optimizing for size via -Os. If the code contains a very large number of argument that have to be packed, code size and also compilation time may become excessive. If that is the case, it may be better to disable this option. Instances of packing can be found by using -Warray-temporaries. -fexternal-blas This option will make gfortran generate calls to BLAS functions for some matrix operations like "MATMUL", instead of using our own algorithms, if the size of the matrices involved is larger than a given limit (see -fblas-matmul-limit). This may be profitable if an optimized vendor BLAS library is available. The BLAS library will have to be specified at link time. -fblas-matmul-limit=n Only significant when -fexternal-blas is in effect. Matrix multiplication of matrices with size larger than (or equal to) n will be performed by calls to BLAS functions, while others will be handled by gfortran internal algorithms. If the matrices involved are not square, the size comparison is performed using the geometric mean of the dimensions of the argument and result matrices. The default value for n is 30. -finline-matmul-limit=n When front-end optimization is active, some calls to the "MATMUL" intrinsic function will be inlined. This may result in code size increase if the size of the matrix cannot be determined at compile time, as code for both cases is generated. Setting "-finline-matmul-limit=0" will disable inlining in all cases. Setting this option with a value of n will produce inline code for matrices with size up to n. If the matrices involved are not square, the size comparison is performed using the geometric mean of the dimensions of the argument and result matrices. The default value for n is 30. The "-fblas-matmul-limit" can be used to change this value. -frecursive Allow indirect recursion by forcing all local arrays to be allocated on the stack. This flag cannot be used together with -fmax-stack-var-size= or -fno-automatic. -finit-local-zero -finit-derived -finit-integer=n -finit-real=<zero|inf|-inf|nan|snan> -finit-logical=<true|false> -finit-character=n The -finit-local-zero option instructs the compiler to initialize local "INTEGER", "REAL", and "COMPLEX" variables to zero, "LOGICAL" variables to false, and "CHARACTER" variables to a string of null bytes. Finer-grained initialization options are provided by the -finit-integer=n, -finit-real=<zero|inf|-inf|nan|snan> (which also initializes the real and imaginary parts of local "COMPLEX" variables), -finit-logical=<true|false>, and -finit-character=n (where n is an ASCII character value) options. With -finit-derived, components of derived type variables will be initialized according to these flags. Components whose type is not covered by an explicit -finit-* flag will be treated as described above with -finit-local-zero. These options do not initialize * objects with the POINTER attribute * allocatable arrays * variables that appear in an "EQUIVALENCE" statement. (These limitations may be removed in future releases). Note that the -finit-real=nan option initializes "REAL" and "COMPLEX" variables with a quiet NaN. For a signalling NaN use -finit-real=snan; note, however, that compile-time optimizations may convert them into quiet NaN and that trapping needs to be enabled (e.g. via -ffpe-trap). The -finit-integer option will parse the value into an integer of type "INTEGER(kind=C_LONG)" on the host. Said value is then assigned to the integer variables in the Fortran code, which might result in wraparound if the value is too large for the kind. Finally, note that enabling any of the -finit-* options will silence warnings that would have been emitted by -Wuninitialized for the affected local variables. -falign-commons By default, gfortran enforces proper alignment of all variables in a "COMMON" block by padding them as needed. On certain platforms this is mandatory, on others it increases performance. If a "COMMON" block is not declared with consistent data types everywhere, this padding can cause trouble, and -fno-align-commons can be used to disable automatic alignment. The same form of this option should be used for all files that share a "COMMON" block. To avoid potential alignment issues in "COMMON" blocks, it is recommended to order objects from largest to smallest. -fno-protect-parens By default the parentheses in expression are honored for all optimization levels such that the compiler does not do any re- association. Using -fno-protect-parens allows the compiler to reorder "REAL" and "COMPLEX" expressions to produce faster code. Note that for the re-association optimization -fno-signed-zeros and -fno-trapping-math need to be in effect. The parentheses protection is enabled by default, unless -Ofast is given. -frealloc-lhs An allocatable left-hand side of an intrinsic assignment is automatically (re)allocated if it is either unallocated or has a different shape. The option is enabled by default except when -std=f95 is given. See also -Wrealloc-lhs. -faggressive-function-elimination Functions with identical argument lists are eliminated within statements, regardless of whether these functions are marked "PURE" or not. For example, in a = f(b,c) + f(b,c) there will only be a single call to "f". This option only works if -ffrontend-optimize is in effect. -ffrontend-optimize This option performs front-end optimization, based on manipulating parts the Fortran parse tree. Enabled by default by any -O option except -O0 and -Og. Optimizations enabled by this option include: *<inlining calls to "MATMUL",> *<elimination of identical function calls within expressions,> *<removing unnecessary calls to "TRIM" in comparisons and assignments,> *<replacing TRIM(a) with "a(1:LEN_TRIM(a))" and> *<short-circuiting of logical operators (".AND." and ".OR.").> It can be deselected by specifying -fno-frontend-optimize. -ffrontend-loop-interchange Attempt to interchange loops in the Fortran front end where profitable. Enabled by default by any -O option. At the moment, this option only affects "FORALL" and "DO CONCURRENT" statements with several forall triplets. ENVIRONMENT The gfortran compiler currently does not make use of any environment variables to control its operation above and beyond those that affect the operation of gcc. BUGS For instructions on reporting bugs, see <https://github.com/Homebrew/homebrew-core/issues>. SEE ALSO gpl(7), gfdl(7), fsf-funding(7), cpp(1), gcov(1), gcc(1), as(1), ld(1), gdb(1), dbx(1) and the Info entries for gcc, cpp, gfortran, as, ld, binutils and gdb. AUTHOR See the Info entry for gfortran for contributors to GCC and GNU Fortran. COPYRIGHT Copyright (c) 2004-2023 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Funding Free Software", the Front-Cover Texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the gfdl(7) man page. (a) The FSF's Front-Cover Text is: A GNU Manual (b) The FSF's Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. gcc-13 2023-07-27 GFORTRAN(1)
| null |
c++-13
| null | null | null | null | null |
avifdec
| null | null | null | null | null |
ssl_mail_client
| null | null | null | null | null |
convertsegfilestopdf
| null | null | null | null | null |
xzless
|
xzless is a filter that displays text from compressed files to a terminal. Files supported by xz(1) are decompressed; other files are assumed to be in uncompressed form already. If no files are given, xzless reads from standard input. xzless uses less(1) to present its output. Unlike xzmore, its choice of pager cannot be altered by setting an environment variable. Commands are based on both more(1) and vi(1) and allow back and forth movement and searching. See the less(1) manual for more information. The command named lzless is provided for backward compatibility with LZMA Utils. ENVIRONMENT LESSMETACHARS A list of characters special to the shell. Set by xzless unless it is already set in the environment. LESSOPEN Set to a command line to invoke the xz(1) decompressor for preprocessing the input files to less(1). SEE ALSO less(1), xz(1), xzmore(1), zless(1) Tukaani 2024-02-12 XZLESS(1)
|
xzless, lzless - view xz or lzma compressed (text) files
|
xzless [file...] lzless [file...]
| null | null |
tiff2fsspec
| null | null | null | null | null |
convertformat
| null | null | null | null | null |
zstd
|
zstd is a fast lossless compression algorithm and data compression tool, with command line syntax similar to gzip(1) and xz(1). It is based on the LZ77 family, with further FSE & huff0 entropy stages. zstd offers highly configurable compression speed, from fast modes at > 200 MB/s per core, to strong modes with excellent compression ratios. It also features a very fast decoder, with speeds > 500 MB/s per core, which remains roughly stable at all compression settings. zstd command line syntax is generally similar to gzip, but features the following few differences: • Source files are preserved by default. It´s possible to remove them automatically by using the --rm command. • When compressing a single file, zstd displays progress notifications and result summary by default. Use -q to turn them off. • zstd displays a short help page when command line is an error. Use -q to turn it off. • zstd does not accept input from console, though it does accept stdin when it´s not the console. • zstd does not store the input´s filename or attributes, only its contents. zstd processes each file according to the selected operation mode. If no files are given or file is -, zstd reads from standard input and writes the processed data to standard output. zstd will refuse to write compressed data to standard output if it is a terminal: it will display an error message and skip the file. Similarly, zstd will refuse to read compressed data from standard input if it is a terminal. Unless --stdout or -o is specified, files are written to a new file whose name is derived from the source file name: • When compressing, the suffix .zst is appended to the source filename to get the target filename. • When decompressing, the .zst suffix is removed from the source filename to get the target filename Concatenation with .zst Files It is possible to concatenate multiple .zst files. zstd will decompress such agglomerated file as if it was a single .zst file.
|
zstd - zstd, zstdmt, unzstd, zstdcat - Compress or decompress .zst files
|
zstd [OPTIONS] [-|INPUT-FILE] [-o OUTPUT-FILE] zstdmt is equivalent to zstd -T0 unzstd is equivalent to zstd -d zstdcat is equivalent to zstd -dcf
|
Integer Suffixes and Special Values In most places where an integer argument is expected, an optional suffix is supported to easily indicate large integers. There must be no space between the integer and the suffix. KiB Multiply the integer by 1,024 (2^10). Ki, K, and KB are accepted as synonyms for KiB. MiB Multiply the integer by 1,048,576 (2^20). Mi, M, and MB are accepted as synonyms for MiB. Operation Mode If multiple operation mode options are given, the last one takes effect. -z, --compress Compress. This is the default operation mode when no operation mode option is specified and no other operation mode is implied from the command name (for example, unzstd implies --decompress). -d, --decompress, --uncompress Decompress. -t, --test Test the integrity of compressed files. This option is equivalent to --decompress --stdout > /dev/null, decompressed data is discarded and checksummed for errors. No files are created or removed. -b# Benchmark file(s) using compression level #. See BENCHMARK below for a description of this operation. --train FILES Use FILES as a training set to create a dictionary. The training set should contain a lot of small files (> 100). See DICTIONARY BUILDER below for a description of this operation. -l, --list Display information related to a zstd compressed file, such as size, ratio, and checksum. Some of these fields may not be available. This command´s output can be augmented with the -v modifier. Operation Modifiers • -#: selects # compression level [1-19] (default: 3). Higher compression levels generally produce higher compression ratio at the expense of speed and memory. A rough rule of thumb is that compression speed is expected to be divided by 2 every 2 levels. Technically, each level is mapped to a set of advanced parameters (that can also be modified individually, see below). Because the compressor´s behavior highly depends on the content to compress, there´s no guarantee of a smooth progression from one level to another. • --ultra: unlocks high compression levels 20+ (maximum 22), using a lot more memory. Note that decompression will also require more memory when using these levels. • --fast[=#]: switch to ultra-fast compression levels. If =# is not present, it defaults to 1. The higher the value, the faster the compression speed, at the cost of some compression ratio. This setting overwrites compression level if one was set previously. Similarly, if a compression level is set after --fast, it overrides it. • -T#, --threads=#: Compress using # working threads (default: 1). If # is 0, attempt to detect and use the number of physical CPU cores. In all cases, the nb of threads is capped to ZSTDMT_NBWORKERS_MAX, which is either 64 in 32-bit mode, or 256 for 64-bit environments. This modifier does nothing if zstd is compiled without multithread support. • --single-thread: Use a single thread for both I/O and compression. As compression is serialized with I/O, this can be slightly slower. Single-thread mode features significantly lower memory usage, which can be useful for systems with limited amount of memory, such as 32-bit systems. Note 1: this mode is the only available one when multithread support is disabled. Note 2: this mode is different from -T1, which spawns 1 compression thread in parallel with I/O. Final compressed result is also slightly different from -T1. • --auto-threads={physical,logical} (default: physical): When using a default amount of threads via -T0, choose the default based on the number of detected physical or logical cores. • --adapt[=min=#,max=#]: zstd will dynamically adapt compression level to perceived I/O conditions. Compression level adaptation can be observed live by using command -v. Adaptation can be constrained between supplied min and max levels. The feature works when combined with multi-threading and --long mode. It does not work with --single-thread. It sets window size to 8 MiB by default (can be changed manually, see wlog). Due to the chaotic nature of dynamic adaptation, compressed result is not reproducible. Note: at the time of this writing, --adapt can remain stuck at low speed when combined with multiple worker threads (>=2). • --long[=#]: enables long distance matching with # windowLog, if # is not present it defaults to 27. This increases the window size (windowLog) and memory usage for both the compressor and decompressor. This setting is designed to improve the compression ratio for files with long matches at a large distance. Note: If windowLog is set to larger than 27, --long=windowLog or --memory=windowSize needs to be passed to the decompressor. • -D DICT: use DICT as Dictionary to compress or decompress FILE(s) • --patch-from FILE: Specify the file to be used as a reference point for zstd´s diff engine. This is effectively dictionary compression with some convenient parameter selection, namely that windowSize > srcSize. Note: cannot use both this and -D together. Note: --long mode will be automatically activated if chainLog < fileLog (fileLog being the windowLog required to cover the whole file). You can also manually force it. Note: for all levels, you can use --patch-from in --single-thread mode to improve compression ratio at the cost of speed. Note: for level 19, you can get increased compression ratio at the cost of speed by specifying --zstd=targetLength= to be something large (i.e. 4096), and by setting a large --zstd=chainLog=. • --rsyncable: zstd will periodically synchronize the compression state to make the compressed file more rsync-friendly. There is a negligible impact to compression ratio, and a potential impact to compression speed, perceptible at higher speeds, for example when combining --rsyncable with many parallel worker threads. This feature does not work with --single-thread. You probably don´t want to use it with long range mode, since it will decrease the effectiveness of the synchronization points, but your mileage may vary. • -C, --[no-]check: add integrity check computed from uncompressed data (default: enabled) • --[no-]content-size: enable / disable whether or not the original size of the file is placed in the header of the compressed file. The default option is --content-size (meaning that the original size will be placed in the header). • --no-dictID: do not store dictionary ID within frame header (dictionary compression). The decoder will have to rely on implicit knowledge about which dictionary to use, it won´t be able to check if it´s correct. • -M#, --memory=#: Set a memory usage limit. By default, zstd uses 128 MiB for decompression as the maximum amount of memory the decompressor is allowed to use, but you can override this manually if need be in either direction (i.e. you can increase or decrease it). This is also used during compression when using with --patch-from=. In this case, this parameter overrides that maximum size allowed for a dictionary. (128 MiB). Additionally, this can be used to limit memory for dictionary training. This parameter overrides the default limit of 2 GiB. zstd will load training samples up to the memory limit and ignore the rest. • --stream-size=#: Sets the pledged source size of input coming from a stream. This value must be exact, as it will be included in the produced frame header. Incorrect stream sizes will cause an error. This information will be used to better optimize compression parameters, resulting in better and potentially faster compression, especially for smaller source sizes. • --size-hint=#: When handling input from a stream, zstd must guess how large the source size will be when optimizing compression parameters. If the stream size is relatively small, this guess may be a poor one, resulting in a higher compression ratio than expected. This feature allows for controlling the guess when needed. Exact guesses result in better compression ratios. Overestimates result in slightly degraded compression ratios, while underestimates may result in significant degradation. • --target-compressed-block-size=#: Attempt to produce compressed blocks of approximately this size. This will split larger blocks in order to approach this target. This feature is notably useful for improved latency, when the receiver can leverage receiving early incomplete data. This parameter defines a loose target: compressed blocks will target this size "on average", but individual blocks can still be larger or smaller. Enabling this feature can decrease compression speed by up to ~10% at level 1. Higher levels will see smaller relative speed regression, becoming invisible at higher settings. • -f, --force: disable input and output checks. Allows overwriting existing files, input from console, output to stdout, operating on links, block devices, etc. During decompression and when the output destination is stdout, pass-through unrecognized formats as-is. • -c, --stdout: write to standard output (even if it is the console); keep original files (disable --rm). • -o FILE: save result into FILE. Note that this operation is in conflict with -c. If both operations are present on the command line, the last expressed one wins. • --[no-]sparse: enable / disable sparse FS support, to make files with many zeroes smaller on disk. Creating sparse files may save disk space and speed up decompression by reducing the amount of disk I/O. default: enabled when output is into a file, and disabled when output is stdout. This setting overrides default and can force sparse mode over stdout. • --[no-]pass-through enable / disable passing through uncompressed files as-is. During decompression when pass-through is enabled, unrecognized formats will be copied as-is from the input to the output. By default, pass-through will occur when the output destination is stdout and the force (-f) option is set. • --rm: remove source file(s) after successful compression or decompression. This command is silently ignored if output is stdout. If used in combination with -o, triggers a confirmation prompt (which can be silenced with -f), as this is a destructive operation. • -k, --keep: keep source file(s) after successful compression or decompression. This is the default behavior. • -r: operate recursively on directories. It selects all files in the named directory and all its subdirectories. This can be useful both to reduce command line typing, and to circumvent shell expansion limitations, when there are a lot of files and naming breaks the maximum size of a command line. • --filelist FILE read a list of files to process as content from FILE. Format is compatible with ls output, with one file per line. • --output-dir-flat DIR: resulting files are stored into target DIR directory, instead of same directory as origin file. Be aware that this command can introduce name collision issues, if multiple files, from different directories, end up having the same name. Collision resolution ensures first file with a given name will be present in DIR, while in combination with -f, the last file will be present instead. • --output-dir-mirror DIR: similar to --output-dir-flat, the output files are stored underneath target DIR directory, but this option will replicate input directory hierarchy into output DIR. If input directory contains "..", the files in this directory will be ignored. If input directory is an absolute directory (i.e. "/var/tmp/abc"), it will be stored into the "output-dir/var/tmp/abc". If there are multiple input files or directories, name collision resolution will follow the same rules as --output-dir-flat. • --format=FORMAT: compress and decompress in other formats. If compiled with support, zstd can compress to or decompress from other compression algorithm formats. Possibly available options are zstd, gzip, xz, lzma, and lz4. If no such format is provided, zstd is the default. • -h/-H, --help: display help/long help and exit • -V, --version: display version number and immediately exit. note that, since it exits, flags specified after -V are effectively ignored. Advanced: -vV also displays supported formats. -vvV also displays POSIX support. -qV will only display the version number, suitable for machine reading. • -v, --verbose: verbose mode, display more information • -q, --quiet: suppress warnings, interactivity, and notifications. specify twice to suppress errors too. • --no-progress: do not display the progress bar, but keep all other messages. • --show-default-cparams: shows the default compression parameters that will be used for a particular input file, based on the provided compression level and the input size. If the provided file is not a regular file (e.g. a pipe), this flag will output the parameters used for inputs of unknown size. • --exclude-compressed: only compress files that are not already compressed. • --: All arguments after -- are treated as files gzip Operation Modifiers When invoked via a gzip symlink, zstd will support further options that intend to mimic the gzip behavior: -n, --no-name do not store the original filename and timestamps when compressing a file. This is the default behavior and hence a no-op. --best alias to the option -9. Environment Variables Employing environment variables to set parameters has security implications. Therefore, this avenue is intentionally limited. Only ZSTD_CLEVEL and ZSTD_NBTHREADS are currently supported. They set the default compression level and number of threads to use during compression, respectively. ZSTD_CLEVEL can be used to set the level between 1 and 19 (the "normal" range). If the value of ZSTD_CLEVEL is not a valid integer, it will be ignored with a warning message. ZSTD_CLEVEL just replaces the default compression level (3). ZSTD_NBTHREADS can be used to set the number of threads zstd will attempt to use during compression. If the value of ZSTD_NBTHREADS is not a valid unsigned integer, it will be ignored with a warning message. ZSTD_NBTHREADS has a default value of (1), and is capped at ZSTDMT_NBWORKERS_MAX==200. zstd must be compiled with multithread support for this variable to have any effect. They can both be overridden by corresponding command line arguments: -# for compression level and -T# for number of compression threads. ADVANCED COMPRESSION OPTIONS zstd provides 22 predefined regular compression levels plus the fast levels. A compression level is translated internally into multiple advanced parameters that control the behavior of the compressor (one can observe the result of this translation with --show-default-cparams). These advanced parameters can be overridden using advanced compression options. --zstd[=options]: The options are provided as a comma-separated list. You may specify only the options you want to change and the rest will be taken from the selected or default compression level. The list of available options: strategy=strat, strat=strat Specify a strategy used by a match finder. There are 9 strategies numbered from 1 to 9, from fastest to strongest: 1=ZSTD_fast, 2=ZSTD_dfast, 3=ZSTD_greedy, 4=ZSTD_lazy, 5=ZSTD_lazy2, 6=ZSTD_btlazy2, 7=ZSTD_btopt, 8=ZSTD_btultra, 9=ZSTD_btultra2. windowLog=wlog, wlog=wlog Specify the maximum number of bits for a match distance. The higher number of increases the chance to find a match which usually improves compression ratio. It also increases memory requirements for the compressor and decompressor. The minimum wlog is 10 (1 KiB) and the maximum is 30 (1 GiB) on 32-bit platforms and 31 (2 GiB) on 64-bit platforms. Note: If windowLog is set to larger than 27, --long=windowLog or --memory=windowSize needs to be passed to the decompressor. hashLog=hlog, hlog=hlog Specify the maximum number of bits for a hash table. Bigger hash tables cause fewer collisions which usually makes compression faster, but requires more memory during compression. The minimum hlog is 6 (64 entries / 256 B) and the maximum is 30 (1B entries / 4 GiB). chainLog=clog, clog=clog Specify the maximum number of bits for the secondary search structure, whose form depends on the selected strategy. Higher numbers of bits increases the chance to find a match which usually improves compression ratio. It also slows down compression speed and increases memory requirements for compression. This option is ignored for the ZSTD_fast strategy, which only has the primary hash table. The minimum clog is 6 (64 entries / 256 B) and the maximum is 29 (512M entries / 2 GiB) on 32-bit platforms and 30 (1B entries / 4 GiB) on 64-bit platforms. searchLog=slog, slog=slog Specify the maximum number of searches in a hash chain or a binary tree using logarithmic scale. More searches increases the chance to find a match which usually increases compression ratio but decreases compression speed. The minimum slog is 1 and the maximum is ´windowLog´ - 1. minMatch=mml, mml=mml Specify the minimum searched length of a match in a hash table. Larger search lengths usually decrease compression ratio but improve decompression speed. The minimum mml is 3 and the maximum is 7. targetLength=tlen, tlen=tlen The impact of this field vary depending on selected strategy. For ZSTD_btopt, ZSTD_btultra and ZSTD_btultra2, it specifies the minimum match length that causes match finder to stop searching. A larger targetLength usually improves compression ratio but decreases compression speed. For ZSTD_fast, it triggers ultra-fast mode when > 0. The value represents the amount of data skipped between match sampling. Impact is reversed: a larger targetLength increases compression speed but decreases compression ratio. For all other strategies, this field has no impact. The minimum tlen is 0 and the maximum is 128 KiB. overlapLog=ovlog, ovlog=ovlog Determine overlapSize, amount of data reloaded from previous job. This parameter is only available when multithreading is enabled. Reloading more data improves compression ratio, but decreases speed. The minimum ovlog is 0, and the maximum is 9. 1 means "no overlap", hence completely independent jobs. 9 means "full overlap", meaning up to windowSize is reloaded from previous job. Reducing ovlog by 1 reduces the reloaded amount by a factor 2. For example, 8 means "windowSize/2", and 6 means "windowSize/8". Value 0 is special and means "default": ovlog is automatically determined by zstd. In which case, ovlog will range from 6 to 9, depending on selected strat. ldmHashLog=lhlog, lhlog=lhlog Specify the maximum size for a hash table used for long distance matching. This option is ignored unless long distance matching is enabled. Bigger hash tables usually improve compression ratio at the expense of more memory during compression and a decrease in compression speed. The minimum lhlog is 6 and the maximum is 30 (default: 20). ldmMinMatch=lmml, lmml=lmml Specify the minimum searched length of a match for long distance matching. This option is ignored unless long distance matching is enabled. Larger/very small values usually decrease compression ratio. The minimum lmml is 4 and the maximum is 4096 (default: 64). ldmBucketSizeLog=lblog, lblog=lblog Specify the size of each bucket for the hash table used for long distance matching. This option is ignored unless long distance matching is enabled. Larger bucket sizes improve collision resolution but decrease compression speed. The minimum lblog is 1 and the maximum is 8 (default: 3). ldmHashRateLog=lhrlog, lhrlog=lhrlog Specify the frequency of inserting entries into the long distance matching hash table. This option is ignored unless long distance matching is enabled. Larger values will improve compression speed. Deviating far from the default value will likely result in a decrease in compression ratio. The default value is wlog - lhlog. Example The following parameters sets advanced compression options to something similar to predefined level 19 for files bigger than 256 KB: --zstd=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6 -B#: Specify the size of each compression job. This parameter is only available when multi-threading is enabled. Each compression job is run in parallel, so this value indirectly impacts the nb of active threads. Default job size varies depending on compression level (generally 4 * windowSize). -B# makes it possible to manually select a custom size. Note that job size must respect a minimum value which is enforced transparently. This minimum is either 512 KB, or overlapSize, whichever is largest. Different job sizes will lead to non-identical compressed frames. DICTIONARY BUILDER zstd offers dictionary compression, which greatly improves efficiency on small files and messages. It´s possible to train zstd with a set of samples, the result of which is saved into a file called a dictionary. Then, during compression and decompression, reference the same dictionary, using command -D dictionaryFileName. Compression of small files similar to the sample set will be greatly improved. --train FILEs Use FILEs as training set to create a dictionary. The training set should ideally contain a lot of samples (> 100), and weight typically 100x the target dictionary size (for example, ~10 MB for a 100 KB dictionary). --train can be combined with -r to indicate a directory rather than listing all the files, which can be useful to circumvent shell expansion limits. Since dictionary compression is mostly effective for small files, the expectation is that the training set will only contain small files. In the case where some samples happen to be large, only the first 128 KiB of these samples will be used for training. --train supports multithreading if zstd is compiled with threading support (default). Additional advanced parameters can be specified with --train-fastcover. The legacy dictionary builder can be accessed with --train-legacy. The slower cover dictionary builder can be accessed with --train-cover. Default --train is equivalent to --train-fastcover=d=8,steps=4. -o FILE Dictionary saved into FILE (default name: dictionary). --maxdict=# Limit dictionary to specified size (default: 112640 bytes). As usual, quantities are expressed in bytes by default, and it´s possible to employ suffixes (like KB or MB) to specify larger values. -# Use # compression level during training (optional). Will generate statistics more tuned for selected compression level, resulting in a small compression ratio improvement for this level. -B# Split input files into blocks of size # (default: no split) -M#, --memory=# Limit the amount of sample data loaded for training (default: 2 GB). Note that the default (2 GB) is also the maximum. This parameter can be useful in situations where the training set size is not well controlled and could be potentially very large. Since speed of the training process is directly correlated to the size of the training sample set, a smaller sample set leads to faster training. In situations where the training set is larger than maximum memory, the CLI will randomly select samples among the available ones, up to the maximum allowed memory budget. This is meant to improve dictionary relevance by mitigating the potential impact of clustering, such as selecting only files from the beginning of a list sorted by modification date, or sorted by alphabetical order. The randomization process is deterministic, so training of the same list of files with the same parameters will lead to the creation of the same dictionary. --dictID=# A dictionary ID is a locally unique ID. The decoder will use this value to verify it is using the right dictionary. By default, zstd will create a 4-bytes random number ID. It´s possible to provide an explicit number ID instead. It´s up to the dictionary manager to not assign twice the same ID to 2 different dictionaries. Note that short numbers have an advantage: an ID < 256 will only need 1 byte in the compressed frame header, and an ID < 65536 will only need 2 bytes. This compares favorably to 4 bytes default. Note that RFC8878 reserves IDs less than 32768 and greater than or equal to 2^31, so they should not be used in public. --train-cover[=k#,d=#,steps=#,split=#,shrink[=#]] Select parameters for the default dictionary builder algorithm named cover. If d is not specified, then it tries d = 6 and d = 8. If k is not specified, then it tries steps values in the range [50, 2000]. If steps is not specified, then the default value of 40 is used. If split is not specified or split <= 0, then the default value of 100 is used. Requires that d <= k. If shrink flag is not used, then the default value for shrinkDict of 0 is used. If shrink is not specified, then the default value for shrinkDictMaxRegression of 1 is used. Selects segments of size k with highest score to put in the dictionary. The score of a segment is computed by the sum of the frequencies of all the subsegments of size d. Generally d should be in the range [6, 8], occasionally up to 16, but the algorithm will run faster with d <= 8. Good values for k vary widely based on the input data, but a safe range is [2 * d, 2000]. If split is 100, all input samples are used for both training and testing to find optimal d and k to build dictionary. Supports multithreading if zstd is compiled with threading support. Having shrink enabled takes a truncated dictionary of minimum size and doubles in size until compression ratio of the truncated dictionary is at most shrinkDictMaxRegression% worse than the compression ratio of the largest dictionary. Examples: zstd --train-cover FILEs zstd --train-cover=k=50,d=8 FILEs zstd --train-cover=d=8,steps=500 FILEs zstd --train-cover=k=50 FILEs zstd --train-cover=k=50,split=60 FILEs zstd --train-cover=shrink FILEs zstd --train-cover=shrink=2 FILEs --train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#] Same as cover but with extra parameters f and accel and different default value of split If split is not specified, then it tries split = 75. If f is not specified, then it tries f = 20. Requires that 0 < f < 32. If accel is not specified, then it tries accel = 1. Requires that 0 < accel <= 10. Requires that d = 6 or d = 8. f is log of size of array that keeps track of frequency of subsegments of size d. The subsegment is hashed to an index in the range [0,2^f - 1]. It is possible that 2 different subsegments are hashed to the same index, and they are considered as the same subsegment when computing frequency. Using a higher f reduces collision but takes longer. Examples: zstd --train-fastcover FILEs zstd --train-fastcover=d=8,f=15,accel=2 FILEs --train-legacy[=selectivity=#] Use legacy dictionary builder algorithm with the given dictionary selectivity (default: 9). The smaller the selectivity value, the denser the dictionary, improving its efficiency but reducing its achievable maximum size. --train-legacy=s=# is also accepted. Examples: zstd --train-legacy FILEs zstd --train-legacy=selectivity=8 FILEs BENCHMARK The zstd CLI provides a benchmarking mode that can be used to easily find suitable compression parameters, or alternatively to benchmark a computer´s performance. Note that the results are highly dependent on the content being compressed. -b# benchmark file(s) using compression level # -e# benchmark file(s) using multiple compression levels, from -b# to -e# (inclusive) -d benchmark decompression speed only (requires providing an already zstd-compressed content) -i# minimum evaluation time, in seconds (default: 3s), benchmark mode only -B#, --block-size=# cut file(s) into independent chunks of size # (default: no chunking) --priority=rt set process priority to real-time (Windows) Output Format: CompressionLevel#Filename: InputSize -> OutputSize (CompressionRatio), CompressionSpeed, DecompressionSpeed Methodology: For both compression and decompression speed, the entire input is compressed/decompressed in-memory to measure speed. A run lasts at least 1 sec, so when files are small, they are compressed/decompressed several times per run, in order to improve measurement accuracy. SEE ALSO zstdgrep(1), zstdless(1), gzip(1), xz(1) The zstandard format is specified in Y. Collet, "Zstandard Compression and the ´application/zstd´ Media Type", https://www.ietf.org/rfc/rfc8878.txt, Internet RFC 8878 (February 2021). BUGS Report bugs at: https://github.com/facebook/zstd/issues AUTHOR Yann Collet zstd 1.5.6 March 2024 ZSTD(1)
| null |
gunlink
|
Call the unlink function to remove the specified FILE. --help display this help and exit --version output version information and exit AUTHOR Written by Michael Stone. REPORTING BUGS GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Report any translation bugs to <https://translationproject.org/team/> COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO unlink(2) Full documentation <https://www.gnu.org/software/coreutils/unlink> or available locally via: info '(coreutils) unlink invocation' GNU coreutils 9.3 April 2023 UNLINK(1)
|
unlink - call the unlink function to remove the specified file
|
unlink FILE unlink OPTION
| null | null |
exrmakepreview
| null | null | null | null | null |
msgcmp
|
Compare two Uniforum style .po files to check that both contain the same set of msgid strings. The def.po file is an existing PO file with the translations. The ref.pot file is the last created PO file, or a PO Template file (generally created by xgettext). This is useful for checking that you have translated each and every message in your program. Where an exact match cannot be found, fuzzy matching is used to produce better diagnostics. Mandatory arguments to long options are mandatory for short options too. Input file location: def.po translations ref.pot references to the sources -D, --directory=DIRECTORY add DIRECTORY to list for input files search Operation modifiers: -m, --multi-domain apply ref.pot to each of the domains in def.po -N, --no-fuzzy-matching do not use fuzzy matching --use-fuzzy consider fuzzy entries --use-untranslated consider untranslated entries Input file syntax: -P, --properties-input input files are in Java .properties syntax --stringtable-input input files are in NeXTstep/GNUstep .strings syntax Informative output: -h, --help display this help and exit -V, --version output version information and exit AUTHOR Written by Peter Miller. REPORTING BUGS Report bugs in the bug tracker at <https://savannah.gnu.org/projects/gettext> or by email to <bug-gettext@gnu.org>. COPYRIGHT Copyright © 1995-2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO The full documentation for msgcmp is maintained as a Texinfo manual. If the info and msgcmp programs are properly installed at your site, the command info msgcmp should give you access to the complete manual. GNU gettext-tools 0.22.5 February 2024 MSGCMP(1)
|
msgcmp - compare message catalog and template
|
msgcmp [OPTION] def.po ref.pot
| null | null |
mysql_test_event_tracking
| null | null | null | null | null |
pyngrok
| null | null | null | null | null |
lzcmp
|
xzcmp and xzdiff compare uncompressed contents of two files. Uncompressed data and options are passed to cmp(1) or diff(1) unless --help or --version is specified. If both file1 and file2 are specified, they can be uncompressed files or files in formats that xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), or lz4(1) can decompress. The required decompression commands are determined from the filename suffixes of file1 and file2. A file with an unknown suffix is assumed to be either uncompressed or in a format that xz(1) can decompress. If only one filename is provided, file1 must have a suffix of a supported compression format and the name for file2 is assumed to be file1 with the compression format suffix removed. The commands lzcmp and lzdiff are provided for backward compatibility with LZMA Utils. EXIT STATUS If a decompression error occurs, the exit status is 2. Otherwise the exit status of cmp(1) or diff(1) is used. SEE ALSO cmp(1), diff(1), xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), lz4(1) Tukaani 2024-02-13 XZDIFF(1)
|
xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files
|
xzcmp [option...] file1 [file2] xzdiff ... lzcmp ... lzdiff ...
| null | null |
mysql_ssl_rsa_setup
|
Note mysql_ssl_rsa_setup is deprecated. Instead, consider using MySQL server to generate missing SSL and RSA files automatically at startup (see the section called “Automatic SSL and RSA File Generation”). This program creates the SSL certificate and key files and RSA key-pair files required to support secure connections using SSL and secure password exchange using RSA over unencrypted connections, if those files are missing. mysql_ssl_rsa_setup can also be used to create new SSL files if the existing ones have expired. Note mysql_ssl_rsa_setup uses the openssl command, so its use is contingent on having OpenSSL installed on your machine. Another way to generate SSL and RSA files, for MySQL distributions compiled using OpenSSL, is to have the server generate them automatically. See Section 6.3.3.1, “Creating SSL and RSA Certificates and Keys using MySQL”. Important mysql_ssl_rsa_setup helps lower the barrier to using SSL by making it easier to generate the required files. However, certificates generated by mysql_ssl_rsa_setup are self-signed, which is not very secure. After you gain experience using the files created by mysql_ssl_rsa_setup, consider obtaining a CA certificate from a registered certificate authority. Invoke mysql_ssl_rsa_setup like this: mysql_ssl_rsa_setup [options] Typical options are --datadir to specify where to create the files, and --verbose to see the openssl commands that mysql_ssl_rsa_setup executes. mysql_ssl_rsa_setup attempts to create SSL and RSA files using a default set of file names. It works as follows: 1. mysql_ssl_rsa_setup checks for the openssl binary at the locations specified by the PATH environment variable. If openssl is not found, mysql_ssl_rsa_setup does nothing. If openssl is present, mysql_ssl_rsa_setup looks for default SSL and RSA files in the MySQL data directory specified by the --datadir option, or the compiled-in data directory if the --datadir option is not given. 2. mysql_ssl_rsa_setup checks the data directory for SSL files with the following names: ca.pem server-cert.pem server-key.pem 3. If any of those files are present, mysql_ssl_rsa_setup creates no SSL files. Otherwise, it invokes openssl to create them, plus some additional files: ca.pem Self-signed CA certificate ca-key.pem CA private key server-cert.pem Server certificate server-key.pem Server private key client-cert.pem Client certificate client-key.pem Client private key These files enable secure client connections using SSL; see Section 6.3.1, “Configuring MySQL to Use Encrypted Connections”. 4. mysql_ssl_rsa_setup checks the data directory for RSA files with the following names: private_key.pem Private member of private/public key pair public_key.pem Public member of private/public key pair 5. If any of these files are present, mysql_ssl_rsa_setup creates no RSA files. Otherwise, it invokes openssl to create them. These files enable secure password exchange using RSA over unencrypted connections for accounts authenticated by the sha256_password or caching_sha2_password plugin; see Section 6.4.1.3, “SHA-256 Pluggable Authentication”, and Section 6.4.1.2, “Caching SHA-2 Pluggable Authentication”. For information about the characteristics of files created by mysql_ssl_rsa_setup, see Section 6.3.3.1, “Creating SSL and RSA Certificates and Keys using MySQL”. At startup, the MySQL server automatically uses the SSL files created by mysql_ssl_rsa_setup to enable SSL if no explicit SSL options are given other than --ssl (possibly along with ssl_cipher). If you prefer to designate the files explicitly, invoke clients with the --ssl-ca, --ssl-cert, and --ssl-key options at startup to name the ca.pem, server-cert.pem, and server-key.pem files, respectively. The server also automatically uses the RSA files created by mysql_ssl_rsa_setup to enable RSA if no explicit RSA options are given. If the server is SSL-enabled, clients use SSL by default for the connection. To specify certificate and key files explicitly, use the --ssl-ca, --ssl-cert, and --ssl-key options to name the ca.pem, client-cert.pem, and client-key.pem files, respectively. However, some additional client setup may be required first because mysql_ssl_rsa_setup by default creates those files in the data directory. The permissions for the data directory normally enable access only to the system account that runs the MySQL server, so client programs cannot use files located there. To make the files available, copy them to a directory that is readable (but not writable) by clients: • For local clients, the MySQL installation directory can be used. For example, if the data directory is a subdirectory of the installation directory and your current location is the data directory, you can copy the files like this: cp ca.pem client-cert.pem client-key.pem .. • For remote clients, distribute the files using a secure channel to ensure they are not tampered with during transit. If the SSL files used for a MySQL installation have expired, you can use mysql_ssl_rsa_setup to create new ones: 1. Stop the server. 2. Rename or remove the existing SSL files. You may wish to make a backup of them first. (The RSA files do not expire, so you need not remove them. mysql_ssl_rsa_setup can see that they exist and does not overwrite them.) 3. Run mysql_ssl_rsa_setup with the --datadir option to specify where to create the new files. 4. Restart the server. mysql_ssl_rsa_setup supports the following command-line options, which can be specified on the command line or in the [mysql_ssl_rsa_setup] and [mysqld] groups of an option file. For information about option files used by MySQL programs, see Section 4.2.2.2, “Using Option Files”. • --help, ? ┌────────────────────┬────────┐ │Command-Line Format │ --help │ ├────────────────────┼────────┤ │Deprecated │ Yes │ └────────────────────┴────────┘ Display a help message and exit. • --datadir=dir_name ┌────────────────────┬────────────────────┐ │Command-Line Format │ --datadir=dir_name │ ├────────────────────┼────────────────────┤ │Deprecated │ Yes │ ├────────────────────┼────────────────────┤ │Type │ Directory name │ └────────────────────┴────────────────────┘ The path to the directory that mysql_ssl_rsa_setup should check for default SSL and RSA files and in which it should create files if they are missing. The default is the compiled-in data directory. • --suffix=str ┌────────────────────┬──────────────┐ │Command-Line Format │ --suffix=str │ ├────────────────────┼──────────────┤ │Deprecated │ Yes │ ├────────────────────┼──────────────┤ │Type │ String │ └────────────────────┴──────────────┘ The suffix for the Common Name attribute in X.509 certificates. The suffix value is limited to 17 characters. The default is based on the MySQL version number. • --uid=name, -v ┌────────────────────┬────────────┐ │Command-Line Format │ --uid=name │ ├────────────────────┼────────────┤ │Deprecated │ Yes │ └────────────────────┴────────────┘ The name of the user who should be the owner of any created files. The value is a user name, not a numeric user ID. In the absence of this option, files created by mysql_ssl_rsa_setup are owned by the user who executes it. This option is valid only if you execute the program as root on a system that supports the chown() system call. • --verbose, -v ┌────────────────────┬───────────┐ │Command-Line Format │ --verbose │ ├────────────────────┼───────────┤ │Deprecated │ Yes │ └────────────────────┴───────────┘ Verbose mode. Produce more output about what the program does. For example, the program shows the openssl commands it runs, and produces output to indicate whether it skips SSL or RSA file creation because some default file already exists. • --version, -V ┌────────────────────┬───────────┐ │Command-Line Format │ --version │ ├────────────────────┼───────────┤ │Deprecated │ Yes │ └────────────────────┴───────────┘ Display version information and exit. COPYRIGHT Copyright © 1997, 2023, Oracle and/or its affiliates. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. SEE ALSO For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. AUTHOR Oracle Corporation (http://dev.mysql.com/). MySQL 8.3 11/23/2023 MYSQL_SSL_RSA_SETUP(1)
|
mysql_ssl_rsa_setup - create SSL/RSA files
|
mysql_ssl_rsa_setup [options]
| null | null |
mysql
|
mysql is a simple SQL shell with input line editing capabilities. It supports interactive and noninteractive use. When used interactively, query results are presented in an ASCII-table format. When used noninteractively (for example, as a filter), the result is presented in tab-separated format. The output format can be changed using command options. If you have problems due to insufficient memory for large result sets, use the --quick option. This forces mysql to retrieve results from the server a row at a time rather than retrieving the entire result set and buffering it in memory before displaying it. This is done by returning the result set using the mysql_use_result() C API function in the client/server library rather than mysql_store_result(). Note Alternatively, MySQL Shell offers access to the X DevAPI. For details, see MySQL Shell 8.2[1]. Using mysql is very easy. Invoke it from the prompt of your command interpreter as follows: mysql db_name Or: mysql --user=user_name --password db_name In this case, you'll need to enter your password in response to the prompt that mysql displays: Enter password: your_password Then type an SQL statement, end it with ;, \g, or \G and press Enter. Typing Control+C interrupts the current statement if there is one, or cancels any partial input line otherwise. You can execute SQL statements in a script file (batch file) like this: mysql db_name < script.sql > output.tab On Unix, the mysql client logs statements executed interactively to a history file. See the section called “MYSQL CLIENT LOGGING”. MYSQL CLIENT OPTIONS mysql supports the following options, which can be specified on the command line or in the [mysql] and [client] groups of an option file. For information about option files used by MySQL programs, see Section 4.2.2.2, “Using Option Files”. • --help, -? ┌────────────────────┬────────┐ │Command-Line Format │ --help │ └────────────────────┴────────┘ Display a help message and exit. • --auto-rehash ┌────────────────────┬──────────────────┐ │Command-Line Format │ --auto-rehash │ ├────────────────────┼──────────────────┤ │Disabled by │ skip-auto-rehash │ └────────────────────┴──────────────────┘ Enable automatic rehashing. This option is on by default, which enables database, table, and column name completion. Use --disable-auto-rehash to disable rehashing. That causes mysql to start faster, but you must issue the rehash command or its \# shortcut if you want to use name completion. To complete a name, enter the first part and press Tab. If the name is unambiguous, mysql completes it. Otherwise, you can press Tab again to see the possible names that begin with what you have typed so far. Completion does not occur if there is no default database. Note This feature requires a MySQL client that is compiled with the readline library. Typically, the readline library is not available on Windows. • --auto-vertical-output ┌────────────────────┬────────────────────────┐ │Command-Line Format │ --auto-vertical-output │ └────────────────────┴────────────────────────┘ Cause result sets to be displayed vertically if they are too wide for the current window, and using normal tabular format otherwise. (This applies to statements terminated by ; or \G.) • --batch, -B ┌────────────────────┬─────────┐ │Command-Line Format │ --batch │ └────────────────────┴─────────┘ Print results using tab as the column separator, with each row on a new line. With this option, mysql does not use the history file. Batch mode results in nontabular output format and escaping of special characters. Escaping may be disabled by using raw mode; see the description for the --raw option. • --binary-as-hex ┌────────────────────┬─────────────────────────┐ │Command-Line Format │ --binary-as-hex │ ├────────────────────┼─────────────────────────┤ │Type │ Boolean │ ├────────────────────┼─────────────────────────┤ │Default Value │ FALSE in noninteractive │ │ │ mode │ └────────────────────┴─────────────────────────┘ When this option is given, mysql displays binary data using hexadecimal notation (0xvalue). This occurs whether the overall output display format is tabular, vertical, HTML, or XML. --binary-as-hex when enabled affects display of all binary strings, including those returned by functions such as CHAR() and UNHEX(). The following example demonstrates this using the ASCII code for A (65 decimal, 41 hexadecimal): • --binary-as-hex disabled: mysql> SELECT CHAR(0x41), UNHEX('41'); +------------+-------------+ | CHAR(0x41) | UNHEX('41') | +------------+-------------+ | A | A | +------------+-------------+ • --binary-as-hex enabled: mysql> SELECT CHAR(0x41), UNHEX('41'); +------------------------+--------------------------+ | CHAR(0x41) | UNHEX('41') | +------------------------+--------------------------+ | 0x41 | 0x41 | +------------------------+--------------------------+ To write a binary string expression so that it displays as a character string regardless of whether --binary-as-hex is enabled, use these techniques: • The CHAR() function has a USING charset clause: mysql> SELECT CHAR(0x41 USING utf8mb4); +--------------------------+ | CHAR(0x41 USING utf8mb4) | +--------------------------+ | A | +--------------------------+ • More generally, use CONVERT() to convert an expression to a given character set: mysql> SELECT CONVERT(UNHEX('41') USING utf8mb4); +------------------------------------+ | CONVERT(UNHEX('41') USING utf8mb4) | +------------------------------------+ | A | +------------------------------------+ When mysql operates in interactive mode, this option is enabled by default. In addition, output from the status (or \s) command includes this line when the option is enabled implicitly or explicitly: Binary data as: Hexadecimal To disable hexadecimal notation, use --skip-binary-as-hex • --binary-mode ┌────────────────────┬───────────────┐ │Command-Line Format │ --binary-mode │ └────────────────────┴───────────────┘ This option helps when processing mysqlbinlog output that may contain BLOB values. By default, mysql translates \r\n in statement strings to \n and interprets \0 as the statement terminator. --binary-mode disables both features. It also disables all mysql commands except charset and delimiter in noninteractive mode (for input piped to mysql or loaded using the source command). • --bind-address=ip_address ┌────────────────────┬───────────────────────────┐ │Command-Line Format │ --bind-address=ip_address │ └────────────────────┴───────────────────────────┘ On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server. • --character-sets-dir=dir_name ┌────────────────────┬───────────────────────────────┐ │Command-Line Format │ --character-sets-dir=dir_name │ ├────────────────────┼───────────────────────────────┤ │Type │ Directory name │ └────────────────────┴───────────────────────────────┘ The directory where character sets are installed. See Section 10.15, “Character Set Configuration”. • --column-names ┌────────────────────┬────────────────┐ │Command-Line Format │ --column-names │ └────────────────────┴────────────────┘ Write column names in results. • --column-type-info ┌────────────────────┬────────────────────┐ │Command-Line Format │ --column-type-info │ └────────────────────┴────────────────────┘ Display result set metadata. This information corresponds to the contents of C API MYSQL_FIELD data structures. See C API Basic Data Structures[2]. • --comments, -c ┌────────────────────┬────────────┐ │Command-Line Format │ --comments │ ├────────────────────┼────────────┤ │Type │ Boolean │ ├────────────────────┼────────────┤ │Default Value │ TRUE │ └────────────────────┴────────────┘ Whether to preserve or strip comments in statements sent to the server. The default is to preserve them; to strip them, start mysql with --skip-comments. Note The mysql client always passes optimizer hints to the server, regardless of whether this option is given. Comment stripping is deprecated. Expect this feature and the options to control it to be removed in a future MySQL release. • --compress, -C ┌────────────────────┬───────────────────────┐ │Command-Line Format │ --compress[={OFF|ON}] │ ├────────────────────┼───────────────────────┤ │Deprecated │ Yes │ ├────────────────────┼───────────────────────┤ │Type │ Boolean │ ├────────────────────┼───────────────────────┤ │Default Value │ OFF │ └────────────────────┴───────────────────────┘ Compress all information sent between the client and the server if possible. See Section 4.2.8, “Connection Compression Control”. This option is deprecated. Expect it to be removed in a future version of MySQL. See the section called “Configuring Legacy Connection Compression”. • --compression-algorithms=value ┌────────────────────┬────────────────────────────────┐ │Command-Line Format │ --compression-algorithms=value │ ├────────────────────┼────────────────────────────────┤ │Type │ Set │ ├────────────────────┼────────────────────────────────┤ │Default Value │ uncompressed │ ├────────────────────┼────────────────────────────────┤ │Valid Values │ zlib zstd uncompressed │ └────────────────────┴────────────────────────────────┘ The permitted compression algorithms for connections to the server. The available algorithms are the same as for the protocol_compression_algorithms system variable. The default value is uncompressed. For more information, see Section 4.2.8, “Connection Compression Control”. • --connect-expired-password ┌────────────────────┬────────────────────────────┐ │Command-Line Format │ --connect-expired-password │ └────────────────────┴────────────────────────────┘ Indicate to the server that the client can handle sandbox mode if the account used to connect has an expired password. This can be useful for noninteractive invocations of mysql because normally the server disconnects noninteractive clients that attempt to connect using an account with an expired password. (See Section 6.2.16, “Server Handling of Expired Passwords”.) • --connect-timeout=value ┌────────────────────┬─────────────────────────┐ │Command-Line Format │ --connect-timeout=value │ ├────────────────────┼─────────────────────────┤ │Type │ Numeric │ ├────────────────────┼─────────────────────────┤ │Default Value │ 0 │ └────────────────────┴─────────────────────────┘ The number of seconds before connection timeout. (Default value is 0.) • --database=db_name, -D db_name ┌────────────────────┬───────────────────┐ │Command-Line Format │ --database=dbname │ ├────────────────────┼───────────────────┤ │Type │ String │ └────────────────────┴───────────────────┘ The database to use. This is useful primarily in an option file. • --debug[=debug_options], -# [debug_options] ┌────────────────────┬─────────────────────────┐ │Command-Line Format │ --debug[=debug_options] │ ├────────────────────┼─────────────────────────┤ │Type │ String │ ├────────────────────┼─────────────────────────┤ │Default Value │ d:t:o,/tmp/mysql.trace │ └────────────────────┴─────────────────────────┘ Write a debugging log. A typical debug_options string is d:t:o,file_name. The default is d:t:o,/tmp/mysql.trace. This option is available only if MySQL was built using WITH_DEBUG. MySQL release binaries provided by Oracle are not built using this option. • --debug-check ┌────────────────────┬───────────────┐ │Command-Line Format │ --debug-check │ ├────────────────────┼───────────────┤ │Type │ Boolean │ ├────────────────────┼───────────────┤ │Default Value │ FALSE │ └────────────────────┴───────────────┘ Print some debugging information when the program exits. This option is available only if MySQL was built using WITH_DEBUG. MySQL release binaries provided by Oracle are not built using this option. • --debug-info, -T ┌────────────────────┬──────────────┐ │Command-Line Format │ --debug-info │ ├────────────────────┼──────────────┤ │Type │ Boolean │ ├────────────────────┼──────────────┤ │Default Value │ FALSE │ └────────────────────┴──────────────┘ Print debugging information and memory and CPU usage statistics when the program exits. This option is available only if MySQL was built using WITH_DEBUG. MySQL release binaries provided by Oracle are not built using this option. • --default-auth=plugin ┌────────────────────┬───────────────────────┐ │Command-Line Format │ --default-auth=plugin │ ├────────────────────┼───────────────────────┤ │Type │ String │ └────────────────────┴───────────────────────┘ A hint about which client-side authentication plugin to use. See Section 6.2.17, “Pluggable Authentication”. • --default-character-set=charset_name ┌────────────────────┬──────────────────────────────────────┐ │Command-Line Format │ --default-character-set=charset_name │ ├────────────────────┼──────────────────────────────────────┤ │Type │ String │ └────────────────────┴──────────────────────────────────────┘ Use charset_name as the default character set for the client and connection. This option can be useful if the operating system uses one character set and the mysql client by default uses another. In this case, output may be formatted incorrectly. You can usually fix such issues by using this option to force the client to use the system character set instead. For more information, see Section 10.4, “Connection Character Sets and Collations”, and Section 10.15, “Character Set Configuration”. • --defaults-extra-file=file_name ┌────────────────────┬─────────────────────────────────┐ │Command-Line Format │ --defaults-extra-file=file_name │ ├────────────────────┼─────────────────────────────────┤ │Type │ File name │ └────────────────────┴─────────────────────────────────┘ Read this option file after the global option file but (on Unix) before the user option file. If the file does not exist or is otherwise inaccessible, an error occurs. If file_name is not an absolute path name, it is interpreted relative to the current directory. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --defaults-file=file_name ┌────────────────────┬───────────────────────────┐ │Command-Line Format │ --defaults-file=file_name │ ├────────────────────┼───────────────────────────┤ │Type │ File name │ └────────────────────┴───────────────────────────┘ Use only the given option file. If the file does not exist or is otherwise inaccessible, an error occurs. If file_name is not an absolute path name, it is interpreted relative to the current directory. Exception: Even with --defaults-file, client programs read .mylogin.cnf. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --defaults-group-suffix=str ┌────────────────────┬─────────────────────────────┐ │Command-Line Format │ --defaults-group-suffix=str │ ├────────────────────┼─────────────────────────────┤ │Type │ String │ └────────────────────┴─────────────────────────────┘ Read not only the usual option groups, but also groups with the usual names and a suffix of str. For example, mysql normally reads the [client] and [mysql] groups. If this option is given as --defaults-group-suffix=_other, mysql also reads the [client_other] and [mysql_other] groups. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --delimiter=str ┌────────────────────┬─────────────────┐ │Command-Line Format │ --delimiter=str │ ├────────────────────┼─────────────────┤ │Type │ String │ ├────────────────────┼─────────────────┤ │Default Value │ ; │ └────────────────────┴─────────────────┘ Set the statement delimiter. The default is the semicolon character (;). • --disable-named-commands Disable named commands. Use the \* form only, or use named commands only at the beginning of a line ending with a semicolon (;). mysql starts with this option enabled by default. However, even with this option, long-format commands still work from the first line. See the section called “MYSQL CLIENT COMMANDS”. • --dns-srv-name=name ┌────────────────────┬─────────────────────┐ │Command-Line Format │ --dns-srv-name=name │ ├────────────────────┼─────────────────────┤ │Type │ String │ └────────────────────┴─────────────────────┘ Specifies the name of a DNS SRV record that determines the candidate hosts to use for establishing a connection to a MySQL server. For information about DNS SRV support in MySQL, see Section 4.2.6, “Connecting to the Server Using DNS SRV Records”. Suppose that DNS is configured with this SRV information for the example.com domain: Name TTL Class Priority Weight Port Target _mysql._tcp.example.com. 86400 IN SRV 0 5 3306 host1.example.com _mysql._tcp.example.com. 86400 IN SRV 0 10 3306 host2.example.com _mysql._tcp.example.com. 86400 IN SRV 10 5 3306 host3.example.com _mysql._tcp.example.com. 86400 IN SRV 20 5 3306 host4.example.com To use that DNS SRV record, invoke mysql like this: mysql --dns-srv-name=_mysql._tcp.example.com mysql then attempts a connection to each server in the group until a successful connection is established. A failure to connect occurs only if a connection cannot be established to any of the servers. The priority and weight values in the DNS SRV record determine the order in which servers should be tried. When invoked with --dns-srv-name, mysql attempts to establish TCP connections only. The --dns-srv-name option takes precedence over the --host option if both are given. --dns-srv-name causes connection establishment to use the mysql_real_connect_dns_srv() C API function rather than mysql_real_connect(). However, if the connect command is subsequently used at runtime and specifies a host name argument, that host name takes precedence over any --dns-srv-name option given at mysql startup to specify a DNS SRV record. • --enable-cleartext-plugin ┌────────────────────┬───────────────────────────┐ │Command-Line Format │ --enable-cleartext-plugin │ ├────────────────────┼───────────────────────────┤ │Type │ Boolean │ ├────────────────────┼───────────────────────────┤ │Default Value │ FALSE │ └────────────────────┴───────────────────────────┘ Enable the mysql_clear_password cleartext authentication plugin. (See Section 6.4.1.4, “Client-Side Cleartext Pluggable Authentication”.) • --execute=statement, -e statement ┌────────────────────┬─────────────────────┐ │Command-Line Format │ --execute=statement │ ├────────────────────┼─────────────────────┤ │Type │ String │ └────────────────────┴─────────────────────┘ Execute the statement and quit. The default output format is like that produced with --batch. See Section 4.2.2.1, “Using Options on the Command Line”, for some examples. With this option, mysql does not use the history file. • --fido-register-factor=value ┌────────────────────┬──────────────────────────────┐ │Command-Line Format │ --fido-register-factor=value │ ├────────────────────┼──────────────────────────────┤ │Deprecated │ Yes │ ├────────────────────┼──────────────────────────────┤ │Type │ String │ └────────────────────┴──────────────────────────────┘ Note This option is deprecated and subject to removal in a future MySQL release. It is superseded by the --register-factor option, which supports FIDO/FIDO2 device-based authentication. For related information, see Section 6.4.1.11, “WebAuthn Pluggable Authentication”. The factor or factors for which FIDO device registration must be performed. This option value must be a single value, or two values separated by commas. Each value must be 2 or 3, so the permitted option values are '2', '3', '2,3' and '3,2'. For example, an account that requires registration for a 3rd authentication factor invokes the mysql client as follows: mysql --user=user_name --fido-register-factor=3 An account that requires registration for a 2nd and 3rd authentication factor invokes the mysql client as follows: mysql --user=user_name --fido-register-factor=2,3 If registration is successful, a connection is established. If there is an authentication factor with a pending registration, a connection is placed into pending registration mode when attempting to connect to the server. In this case, disconnect and reconnect with the correct --fido-register-factor value to complete the registration. Registration is a two step process comprising initiate registration and finish registration steps. The initiate registration step executes this statement: ALTER USER user factor INITIATE REGISTRATION The statement returns a result set containing a 32 byte challenge, the user name, and the relying party ID (see authentication_fido_rp_id). The finish registration step executes this statement: ALTER USER user factor FINISH REGISTRATION SET CHALLENGE_RESPONSE AS 'auth_string' The statement completes the registration and sends the following information to the server as part of the auth_string: authenticator data, an optional attestation certificate in X.509 format, and a signature. The initiate and registration steps must be performed in a single connection, as the challenge received by the client during the initiate step is saved to the client connection handler. Registration would fail if the registration step was performed by a different connection. The --fido-register-factor option executes both the initiate and registration steps, which avoids the failure scenario described above and prevents having to execute the ALTER USER initiate and registration statements manually. The --fido-register-factor option is only available for the mysql client and MySQL Shell. Other MySQL client programs do not support it. For related information, see the section called “Using FIDO Authentication”. • --force, -f ┌────────────────────┬─────────┐ │Command-Line Format │ --force │ └────────────────────┴─────────┘ Continue even if an SQL error occurs. • --get-server-public-key ┌────────────────────┬─────────────────────────┐ │Command-Line Format │ --get-server-public-key │ ├────────────────────┼─────────────────────────┤ │Type │ Boolean │ └────────────────────┴─────────────────────────┘ Request from the server the public key required for RSA key pair-based password exchange. This option applies to clients that authenticate with the caching_sha2_password authentication plugin. For that plugin, the server does not send the public key unless requested. This option is ignored for accounts that do not authenticate with that plugin. It is also ignored if RSA-based password exchange is not used, as is the case when the client connects to the server using a secure connection. If --server-public-key-path=file_name is given and specifies a valid public key file, it takes precedence over --get-server-public-key. For information about the caching_sha2_password plugin, see Section 6.4.1.2, “Caching SHA-2 Pluggable Authentication”. • --histignore ┌────────────────────┬───────────────────────────┐ │Command-Line Format │ --histignore=pattern_list │ ├────────────────────┼───────────────────────────┤ │Type │ String │ └────────────────────┴───────────────────────────┘ A list of one or more colon-separated patterns specifying statements to ignore for logging purposes. These patterns are added to the default pattern list ("*IDENTIFIED*:*PASSWORD*"). The value specified for this option affects logging of statements written to the history file, and to syslog if the --syslog option is given. For more information, see the section called “MYSQL CLIENT LOGGING”. • --host=host_name, -h host_name ┌────────────────────┬──────────────────┐ │Command-Line Format │ --host=host_name │ ├────────────────────┼──────────────────┤ │Type │ String │ ├────────────────────┼──────────────────┤ │Default Value │ localhost │ └────────────────────┴──────────────────┘ Connect to the MySQL server on the given host. The --dns-srv-name option takes precedence over the --host option if both are given. --dns-srv-name causes connection establishment to use the mysql_real_connect_dns_srv() C API function rather than mysql_real_connect(). However, if the connect command is subsequently used at runtime and specifies a host name argument, that host name takes precedence over any --dns-srv-name option given at mysql startup to specify a DNS SRV record. • --html, -H ┌────────────────────┬────────┐ │Command-Line Format │ --html │ └────────────────────┴────────┘ Produce HTML output. • --ignore-spaces, -i ┌────────────────────┬─────────────────┐ │Command-Line Format │ --ignore-spaces │ └────────────────────┴─────────────────┘ Ignore spaces after function names. The effect of this is described in the discussion for the IGNORE_SPACE SQL mode (see Section 5.1.11, “Server SQL Modes”). • --init-command=str ┌────────────────────┬────────────────────┐ │Command-Line Format │ --init-command=str │ └────────────────────┴────────────────────┘ Single SQL statement to execute after connecting to the server. If auto-reconnect is enabled, the statement is executed again after reconnection occurs. The definition resets existing statements defined by it or init-command-add. • --init-command-add=str ┌────────────────────┬────────────────────────┐ │Command-Line Format │ --init-command-add=str │ └────────────────────┴────────────────────────┘ Add an additional SQL statement to execute after connecting or reconnecting to the MySQL server. It's usable without --init-command but has no effect if used before it because init-command resets the list of commands to call. Option added in MySQL 8.2.0. • --line-numbers ┌────────────────────┬───────────────────┐ │Command-Line Format │ --line-numbers │ ├────────────────────┼───────────────────┤ │Disabled by │ skip-line-numbers │ └────────────────────┴───────────────────┘ Write line numbers for errors. Disable this with --skip-line-numbers. • --load-data-local-dir=dir_name ┌────────────────────┬────────────────────────────────┐ │Command-Line Format │ --load-data-local-dir=dir_name │ ├────────────────────┼────────────────────────────────┤ │Type │ Directory name │ ├────────────────────┼────────────────────────────────┤ │Default Value │ empty string │ └────────────────────┴────────────────────────────────┘ This option affects the client-side LOCAL capability for LOAD DATA operations. It specifies the directory in which files named in LOAD DATA LOCAL statements must be located. The effect of --load-data-local-dir depends on whether LOCAL data loading is enabled or disabled: • If LOCAL data loading is enabled, either by default in the MySQL client library or by specifying --local-infile[=1], the --load-data-local-dir option is ignored. • If LOCAL data loading is disabled, either by default in the MySQL client library or by specifying --local-infile=0, the --load-data-local-dir option applies. When --load-data-local-dir applies, the option value designates the directory in which local data files must be located. Comparison of the directory path name and the path name of files to be loaded is case-sensitive regardless of the case sensitivity of the underlying file system. If the option value is the empty string, it names no directory, with the result that no files are permitted for local data loading. For example, to explicitly disable local data loading except for files located in the /my/local/data directory, invoke mysql like this: mysql --local-infile=0 --load-data-local-dir=/my/local/data When both --local-infile and --load-data-local-dir are given, the order in which they are given does not matter. Successful use of LOCAL load operations within mysql also requires that the server permits local loading; see Section 6.1.6, “Security Considerations for LOAD DATA LOCAL” • --local-infile[={0|1}] ┌────────────────────┬────────────────────────┐ │Command-Line Format │ --local-infile[={0|1}] │ ├────────────────────┼────────────────────────┤ │Type │ Boolean │ ├────────────────────┼────────────────────────┤ │Default Value │ FALSE │ └────────────────────┴────────────────────────┘ By default, LOCAL capability for LOAD DATA is determined by the default compiled into the MySQL client library. To enable or disable LOCAL data loading explicitly, use the --local-infile option. When given with no value, the option enables LOCAL data loading. When given as --local-infile=0 or --local-infile=1, the option disables or enables LOCAL data loading. If LOCAL capability is disabled, the --load-data-local-dir option can be used to permit restricted local loading of files located in a designated directory. Successful use of LOCAL load operations within mysql also requires that the server permits local loading; see Section 6.1.6, “Security Considerations for LOAD DATA LOCAL” • --login-path=name ┌────────────────────┬───────────────────┐ │Command-Line Format │ --login-path=name │ ├────────────────────┼───────────────────┤ │Type │ String │ └────────────────────┴───────────────────┘ Read options from the named login path in the .mylogin.cnf login path file. A “login path” is an option group containing options that specify which MySQL server to connect to and which account to authenticate as. To create or modify a login path file, use the mysql_config_editor utility. See mysql_config_editor(1). For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --no-login-paths ┌────────────────────┬──────────────────┐ │Command-Line Format │ --no-login-paths │ └────────────────────┴──────────────────┘ Skips reading options from the login path file. See --login-path for related information. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --max-allowed-packet=value ┌────────────────────┬────────────────────────────┐ │Command-Line Format │ --max-allowed-packet=value │ ├────────────────────┼────────────────────────────┤ │Type │ Numeric │ ├────────────────────┼────────────────────────────┤ │Default Value │ 16777216 │ └────────────────────┴────────────────────────────┘ The maximum size of the buffer for client/server communication. The default is 16MB, the maximum is 1GB. • --max-join-size=value ┌────────────────────┬───────────────────────┐ │Command-Line Format │ --max-join-size=value │ ├────────────────────┼───────────────────────┤ │Type │ Numeric │ ├────────────────────┼───────────────────────┤ │Default Value │ 1000000 │ └────────────────────┴───────────────────────┘ The automatic limit for rows in a join when using --safe-updates. (Default value is 1,000,000.) • --named-commands, -G ┌────────────────────┬─────────────────────┐ │Command-Line Format │ --named-commands │ ├────────────────────┼─────────────────────┤ │Disabled by │ skip-named-commands │ └────────────────────┴─────────────────────┘ Enable named mysql commands. Long-format commands are permitted, not just short-format commands. For example, quit and \q both are recognized. Use --skip-named-commands to disable named commands. See the section called “MYSQL CLIENT COMMANDS”. • --net-buffer-length=value ┌────────────────────┬───────────────────────────┐ │Command-Line Format │ --net-buffer-length=value │ ├────────────────────┼───────────────────────────┤ │Type │ Numeric │ ├────────────────────┼───────────────────────────┤ │Default Value │ 16384 │ └────────────────────┴───────────────────────────┘ The buffer size for TCP/IP and socket communication. (Default value is 16KB.) • --network-namespace=name ┌────────────────────┬──────────────────────────┐ │Command-Line Format │ --network-namespace=name │ ├────────────────────┼──────────────────────────┤ │Type │ String │ └────────────────────┴──────────────────────────┘ The network namespace to use for TCP/IP connections. If omitted, the connection uses the default (global) namespace. For information about network namespaces, see Section 5.1.14, “Network Namespace Support”. This option is available only on platforms that implement network namespace support. • --no-auto-rehash, -A ┌────────────────────┬──────────────────┐ │Command-Line Format │ --no-auto-rehash │ ├────────────────────┼──────────────────┤ │Deprecated │ Yes │ └────────────────────┴──────────────────┘ This has the same effect as --skip-auto-rehash. See the description for --auto-rehash. • --no-beep, -b ┌────────────────────┬───────────┐ │Command-Line Format │ --no-beep │ └────────────────────┴───────────┘ Do not beep when errors occur. • --no-defaults ┌────────────────────┬───────────────┐ │Command-Line Format │ --no-defaults │ └────────────────────┴───────────────┘ Do not read any option files. If program startup fails due to reading unknown options from an option file, --no-defaults can be used to prevent them from being read. The exception is that the .mylogin.cnf file is read in all cases, if it exists. This permits passwords to be specified in a safer way than on the command line even when --no-defaults is used. To create .mylogin.cnf, use the mysql_config_editor utility. See mysql_config_editor(1). For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --oci-config-file=PATH ┌────────────────────┬───────────────────┐ │Command-Line Format │ --oci-config-file │ ├────────────────────┼───────────────────┤ │Type │ String │ ├────────────────────┼───────────────────┤ │Default Value │ │ └────────────────────┴───────────────────┘ Alternate path to the Oracle Cloud Infrastructure CLI configuration file. Specify the location of the configuration file. If your existing default profile is the correct one, you do not need to specify this option. However, if you have an existing configuration file, with multiple profiles or a different default from the tenancy of the user you want to connect with, specify this option. • --one-database, -o ┌────────────────────┬────────────────┐ │Command-Line Format │ --one-database │ └────────────────────┴────────────────┘ Ignore statements except those that occur while the default database is the one named on the command line. This option is rudimentary and should be used with care. Statement filtering is based only on USE statements. Initially, mysql executes statements in the input because specifying a database db_name on the command line is equivalent to inserting USE db_name at the beginning of the input. Then, for each USE statement encountered, mysql accepts or rejects following statements depending on whether the database named is the one on the command line. The content of the statements is immaterial. Suppose that mysql is invoked to process this set of statements: DELETE FROM db2.t2; USE db2; DROP TABLE db1.t1; CREATE TABLE db1.t1 (i INT); USE db1; INSERT INTO t1 (i) VALUES(1); CREATE TABLE db2.t1 (j INT); If the command line is mysql --force --one-database db1, mysql handles the input as follows: • The DELETE statement is executed because the default database is db1, even though the statement names a table in a different database. • The DROP TABLE and CREATE TABLE statements are not executed because the default database is not db1, even though the statements name a table in db1. • The INSERT and CREATE TABLE statements are executed because the default database is db1, even though the CREATE TABLE statement names a table in a different database. • --pager[=command] ┌────────────────────┬───────────────────┐ │Command-Line Format │ --pager[=command] │ ├────────────────────┼───────────────────┤ │Disabled by │ skip-pager │ ├────────────────────┼───────────────────┤ │Type │ String │ └────────────────────┴───────────────────┘ Use the given command for paging query output. If the command is omitted, the default pager is the value of your PAGER environment variable. Valid pagers are less, more, cat [> filename], and so forth. This option works only on Unix and only in interactive mode. To disable paging, use --skip-pager. the section called “MYSQL CLIENT COMMANDS”, discusses output paging further. • --password[=password], -p[password] ┌────────────────────┬───────────────────────┐ │Command-Line Format │ --password[=password] │ ├────────────────────┼───────────────────────┤ │Type │ String │ └────────────────────┴───────────────────────┘ The password of the MySQL account used for connecting to the server. The password value is optional. If not given, mysql prompts for one. If given, there must be no space between --password= or -p and the password following it. If no password option is specified, the default is to send no password. Specifying a password on the command line should be considered insecure. To avoid giving the password on the command line, use an option file. See Section 6.1.2.1, “End-User Guidelines for Password Security”. To explicitly specify that there is no password and that mysql should not prompt for one, use the --skip-password option. • --password1[=pass_val] The password for multifactor authentication factor 1 of the MySQL account used for connecting to the server. The password value is optional. If not given, mysql prompts for one. If given, there must be no space between --password1= and the password following it. If no password option is specified, the default is to send no password. Specifying a password on the command line should be considered insecure. To avoid giving the password on the command line, use an option file. See Section 6.1.2.1, “End-User Guidelines for Password Security”. To explicitly specify that there is no password and that mysql should not prompt for one, use the --skip-password1 option. --password1 and --password are synonymous, as are --skip-password1 and --skip-password. • --password2[=pass_val] The password for multifactor authentication factor 2 of the MySQL account used for connecting to the server. The semantics of this option are similar to the semantics for --password1; see the description of that option for details. • --password3[=pass_val] The password for multifactor authentication factor 3 of the MySQL account used for connecting to the server. The semantics of this option are similar to the semantics for --password1; see the description of that option for details. • --pipe, -W ┌────────────────────┬────────┐ │Command-Line Format │ --pipe │ ├────────────────────┼────────┤ │Type │ String │ └────────────────────┴────────┘ On Windows, connect to the server using a named pipe. This option applies only if the server was started with the named_pipe system variable enabled to support named-pipe connections. In addition, the user making the connection must be a member of the Windows group specified by the named_pipe_full_access_group system variable. • --plugin-authentication-kerberos-client-mode=value ┌────────────────────┬──────────────────────────────────────────────┐ │Command-Line Format │ --plugin-authentication-kerberos-client-mode │ ├────────────────────┼──────────────────────────────────────────────┤ │Type │ String │ ├────────────────────┼──────────────────────────────────────────────┤ │Default Value │ SSPI │ ├────────────────────┼──────────────────────────────────────────────┤ │Valid Values │ GSSAPI SSPI │ └────────────────────┴──────────────────────────────────────────────┘ On Windows, the authentication_kerberos_client authentication plugin supports this plugin option. It provides two possible values that the client user can set at runtime: SSPI and GSSAPI. The default value for the client-side plugin option uses Security Support Provider Interface (SSPI), which is capable of acquiring credentials from the Windows in-memory cache. Alternatively, the client user can select a mode that supports Generic Security Service Application Program Interface (GSSAPI) through the MIT Kerberos library on Windows. GSSAPI is capable of acquiring cached credentials previously generated by using the kinit command. For more information, see Commands for Windows Clients in GSSAPI Mode. • --plugin-authentication-webauthn-client-preserve-privacy={OFF|ON} ┌────────────────────┬──────────────────────────────────────────────────────────┐ │Command-Line Format │ --plugin-authentication-webauthn-client-preserve-privacy │ ├────────────────────┼──────────────────────────────────────────────────────────┤ │Type │ Boolean │ ├────────────────────┼──────────────────────────────────────────────────────────┤ │Default Value │ OFF │ └────────────────────┴──────────────────────────────────────────────────────────┘ Determines how assertions are sent to server in case there are more than one discoverable credentials stored for a given RP ID (a unique name given to the relying-party server, which is the MySQL server). If the FIDO2 device contains multiple resident keys for a given RP ID, this option allows the user to choose a key to be used for assertion. It provides two possible values that the client user can set. The default value is OFF. If set to OFF, the challenge is signed by all credentials available for a given RP ID and all signatures are sent to server. If set to ON, the user is prompted to choose the credential to be used for signature. Note This option has no effect if the device does not support the resident-key feature. For more information, see Section 6.4.1.11, “WebAuthn Pluggable Authentication”. • --plugin-dir=dir_name ┌────────────────────┬───────────────────────┐ │Command-Line Format │ --plugin-dir=dir_name │ ├────────────────────┼───────────────────────┤ │Type │ Directory name │ └────────────────────┴───────────────────────┘ The directory in which to look for plugins. Specify this option if the --default-auth option is used to specify an authentication plugin but mysql does not find it. See Section 6.2.17, “Pluggable Authentication”. • --port=port_num, -P port_num ┌────────────────────┬─────────────────┐ │Command-Line Format │ --port=port_num │ ├────────────────────┼─────────────────┤ │Type │ Numeric │ ├────────────────────┼─────────────────┤ │Default Value │ 3306 │ └────────────────────┴─────────────────┘ For TCP/IP connections, the port number to use. • --print-defaults ┌────────────────────┬──────────────────┐ │Command-Line Format │ --print-defaults │ └────────────────────┴──────────────────┘ Print the program name and all options that it gets from option files. For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --prompt=format_str ┌────────────────────┬─────────────────────┐ │Command-Line Format │ --prompt=format_str │ ├────────────────────┼─────────────────────┤ │Type │ String │ ├────────────────────┼─────────────────────┤ │Default Value │ mysql> │ └────────────────────┴─────────────────────┘ Set the prompt to the specified format. The default is mysql>. The special sequences that the prompt can contain are described in the section called “MYSQL CLIENT COMMANDS”. • --protocol={TCP|SOCKET|PIPE|MEMORY} ┌────────────────────┬────────────────────────┐ │Command-Line Format │ --protocol=type │ ├────────────────────┼────────────────────────┤ │Type │ String │ ├────────────────────┼────────────────────────┤ │Default Value │ [see text] │ ├────────────────────┼────────────────────────┤ │Valid Values │ TCP SOCKET PIPE │ │ │ MEMORY │ └────────────────────┴────────────────────────┘ The transport protocol to use for connecting to the server. It is useful when the other connection parameters normally result in use of a protocol other than the one you want. For details on the permissible values, see Section 4.2.7, “Connection Transport Protocols”. • --quick, -q ┌────────────────────┬─────────┐ │Command-Line Format │ --quick │ └────────────────────┴─────────┘ Do not cache each query result, print each row as it is received. This may slow down the server if the output is suspended. With this option, mysql does not use the history file. • --raw, -r ┌────────────────────┬───────┐ │Command-Line Format │ --raw │ └────────────────────┴───────┘ For tabular output, the “boxing” around columns enables one column value to be distinguished from another. For nontabular output (such as is produced in batch mode or when the --batch or --silent option is given), special characters are escaped in the output so they can be identified easily. Newline, tab, NUL, and backslash are written as \n, \t, \0, and \\. The --raw option disables this character escaping. The following example demonstrates tabular versus nontabular output and the use of raw mode to disable escaping: % mysql mysql> SELECT CHAR(92); +----------+ | CHAR(92) | +----------+ | \ | +----------+ % mysql -s mysql> SELECT CHAR(92); CHAR(92) \\ % mysql -s -r mysql> SELECT CHAR(92); CHAR(92) \ • --reconnect ┌────────────────────┬────────────────┐ │Command-Line Format │ --reconnect │ ├────────────────────┼────────────────┤ │Disabled by │ skip-reconnect │ └────────────────────┴────────────────┘ If the connection to the server is lost, automatically try to reconnect. A single reconnect attempt is made each time the connection is lost. To suppress reconnection behavior, use --skip-reconnect. • --register-factor=value ┌────────────────────┬─────────────────────────┐ │Command-Line Format │ --register-factor=value │ ├────────────────────┼─────────────────────────┤ │Type │ String │ └────────────────────┴─────────────────────────┘ The factor or factors for which FIDO/FIDO2 device registration must be performed before WebAuthn device-based authentication can be used. This option value must be a single value, or two values separated by commas. Each value must be 2 or 3, so the permitted option values are '2', '3', '2,3' and '3,2'. For example, an account that requires registration for a 3rd authentication factor invokes the mysql client as follows: mysql --user=user_name --register-factor=3 An account that requires registration for a 2nd and 3rd authentication factor invokes the mysql client as follows: mysql --user=user_name --register-factor=2,3 If registration is successful, a connection is established. If there is an authentication factor with a pending registration, a connection is placed into pending registration mode when attempting to connect to the server. In this case, disconnect and reconnect with the correct --register-factor value to complete the registration. Registration is a two step process comprising initiate registration and finish registration steps. The initiate registration step executes this statement: ALTER USER user factor INITIATE REGISTRATION The statement returns a result set containing a 32 byte challenge, the user name, and the relying party ID (see authentication_webauthn_rp_id). The finish registration step executes this statement: ALTER USER user factor FINISH REGISTRATION SET CHALLENGE_RESPONSE AS 'auth_string' The statement completes the registration and sends the following information to the server as part of the auth_string: authenticator data, an optional attestation certificate in X.509 format, and a signature. The initiate and registration steps must be performed in a single connection, as the challenge received by the client during the initiate step is saved to the client connection handler. Registration would fail if the registration step was performed by a different connection. The --register-factor option executes both the initiate and registration steps, which avoids the failure scenario described above and prevents having to execute the ALTER USER initiate and registration statements manually. The --register-factor option is only available for the mysql client. Other MySQL client programs do not support it. For related information, see the section called “Using WebAuthn Authentication”. • --safe-updates, --i-am-a-dummy, -U ┌────────────────────┬────────────────┐ │Command-Line Format │ --safe-updates │ │ │ --i-am-a-dummy │ ├────────────────────┼────────────────┤ │Type │ Boolean │ ├────────────────────┼────────────────┤ │Default Value │ FALSE │ └────────────────────┴────────────────┘ If this option is enabled, UPDATE and DELETE statements that do not use a key in the WHERE clause or a LIMIT clause produce an error. In addition, restrictions are placed on SELECT statements that produce (or are estimated to produce) very large result sets. If you have set this option in an option file, you can use --skip-safe-updates on the command line to override it. For more information about this option, see Using Safe-Updates Mode (--safe- updates). • --select-limit=value ┌────────────────────┬──────────────────────┐ │Command-Line Format │ --select-limit=value │ ├────────────────────┼──────────────────────┤ │Type │ Numeric │ ├────────────────────┼──────────────────────┤ │Default Value │ 1000 │ └────────────────────┴──────────────────────┘ The automatic limit for SELECT statements when using --safe-updates. (Default value is 1,000.) • --server-public-key-path=file_name ┌────────────────────┬────────────────────────────────────┐ │Command-Line Format │ --server-public-key-path=file_name │ ├────────────────────┼────────────────────────────────────┤ │Type │ File name │ └────────────────────┴────────────────────────────────────┘ The path name to a file in PEM format containing a client-side copy of the public key required by the server for RSA key pair-based password exchange. This option applies to clients that authenticate with the sha256_password or caching_sha2_password authentication plugin. This option is ignored for accounts that do not authenticate with one of those plugins. It is also ignored if RSA-based password exchange is not used, as is the case when the client connects to the server using a secure connection. If --server-public-key-path=file_name is given and specifies a valid public key file, it takes precedence over --get-server-public-key. For sha256_password, this option applies only if MySQL was built using OpenSSL. For information about the sha256_password and caching_sha2_password plugins, see Section 6.4.1.3, “SHA-256 Pluggable Authentication”, and Section 6.4.1.2, “Caching SHA-2 Pluggable Authentication”. • --shared-memory-base-name=name ┌────────────────────┬────────────────────────────────┐ │Command-Line Format │ --shared-memory-base-name=name │ ├────────────────────┼────────────────────────────────┤ │Platform Specific │ Windows │ └────────────────────┴────────────────────────────────┘ On Windows, the shared-memory name to use for connections made using shared memory to a local server. The default value is MYSQL. The shared-memory name is case-sensitive. This option applies only if the server was started with the shared_memory system variable enabled to support shared-memory connections. • --show-warnings ┌────────────────────┬─────────────────┐ │Command-Line Format │ --show-warnings │ └────────────────────┴─────────────────┘ Cause warnings to be shown after each statement if there are any. This option applies to interactive and batch mode. • --sigint-ignore ┌────────────────────┬─────────────────┐ │Command-Line Format │ --sigint-ignore │ └────────────────────┴─────────────────┘ Ignore SIGINT signals (typically the result of typing Control+C). Without this option, typing Control+C interrupts the current statement if there is one, or cancels any partial input line otherwise. • --silent, -s ┌────────────────────┬──────────┐ │Command-Line Format │ --silent │ └────────────────────┴──────────┘ Silent mode. Produce less output. This option can be given multiple times to produce less and less output. This option results in nontabular output format and escaping of special characters. Escaping may be disabled by using raw mode; see the description for the --raw option. • --skip-column-names, -N ┌────────────────────┬─────────────────────┐ │Command-Line Format │ --skip-column-names │ └────────────────────┴─────────────────────┘ Do not write column names in results. • --skip-line-numbers, -L ┌────────────────────┬─────────────────────┐ │Command-Line Format │ --skip-line-numbers │ └────────────────────┴─────────────────────┘ Do not write line numbers for errors. Useful when you want to compare result files that include error messages. • --socket=path, -S path ┌────────────────────┬────────────────────────────────┐ │Command-Line Format │ --socket={file_name|pipe_name} │ ├────────────────────┼────────────────────────────────┤ │Type │ String │ └────────────────────┴────────────────────────────────┘ For connections to localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use. On Windows, this option applies only if the server was started with the named_pipe system variable enabled to support named-pipe connections. In addition, the user making the connection must be a member of the Windows group specified by the named_pipe_full_access_group system variable. • --ssl* Options that begin with --ssl specify whether to connect to the server using encryption and indicate where to find SSL keys and certificates. See the section called “Command Options for Encrypted Connections”. • --ssl-fips-mode={OFF|ON|STRICT} ┌────────────────────┬─────────────────────────────────┐ │Command-Line Format │ --ssl-fips-mode={OFF|ON|STRICT} │ ├────────────────────┼─────────────────────────────────┤ │Deprecated │ Yes │ ├────────────────────┼─────────────────────────────────┤ │Type │ Enumeration │ ├────────────────────┼─────────────────────────────────┤ │Default Value │ OFF │ ├────────────────────┼─────────────────────────────────┤ │Valid Values │ OFF ON STRICT │ └────────────────────┴─────────────────────────────────┘ Controls whether to enable FIPS mode on the client side. The --ssl-fips-mode option differs from other --ssl-xxx options in that it is not used to establish encrypted connections, but rather to affect which cryptographic operations to permit. See Section 6.8, “FIPS Support”. These --ssl-fips-mode values are permitted: • OFF: Disable FIPS mode. • ON: Enable FIPS mode. • STRICT: Enable “strict” FIPS mode. Note If the OpenSSL FIPS Object Module is not available, the only permitted value for --ssl-fips-mode is OFF. In this case, setting --ssl-fips-mode to ON or STRICT causes the client to produce a warning at startup and to operate in non-FIPS mode. This option is deprecated. Expect it to be removed in a future version of MySQL. • --syslog, -j ┌────────────────────┬──────────┐ │Command-Line Format │ --syslog │ └────────────────────┴──────────┘ This option causes mysql to send interactive statements to the system logging facility. On Unix, this is syslog; on Windows, it is the Windows Event Log. The destination where logged messages appear is system dependent. On Linux, the destination is often the /var/log/messages file. Here is a sample of output generated on Linux by using --syslog. This output is formatted for readability; each logged message actually takes a single line. Mar 7 12:39:25 myhost MysqlClient[20824]: SYSTEM_USER:'oscar', MYSQL_USER:'my_oscar', CONNECTION_ID:23, DB_SERVER:'127.0.0.1', DB:'--', QUERY:'USE test;' Mar 7 12:39:28 myhost MysqlClient[20824]: SYSTEM_USER:'oscar', MYSQL_USER:'my_oscar', CONNECTION_ID:23, DB_SERVER:'127.0.0.1', DB:'test', QUERY:'SHOW TABLES;' For more information, see the section called “MYSQL CLIENT LOGGING”. • --table, -t ┌────────────────────┬─────────┐ │Command-Line Format │ --table │ └────────────────────┴─────────┘ Display output in table format. This is the default for interactive use, but can be used to produce table output in batch mode. • --tee=file_name ┌────────────────────┬─────────────────┐ │Command-Line Format │ --tee=file_name │ ├────────────────────┼─────────────────┤ │Type │ File name │ └────────────────────┴─────────────────┘ Append a copy of output to the given file. This option works only in interactive mode. the section called “MYSQL CLIENT COMMANDS”, discusses tee files further. • --tls-ciphersuites=ciphersuite_list ┌────────────────────┬─────────────────────────────────────┐ │Command-Line Format │ --tls-ciphersuites=ciphersuite_list │ ├────────────────────┼─────────────────────────────────────┤ │Type │ String │ └────────────────────┴─────────────────────────────────────┘ The permissible ciphersuites for encrypted connections that use TLSv1.3. The value is a list of one or more colon-separated ciphersuite names. The ciphersuites that can be named for this option depend on the SSL library used to compile MySQL. For details, see Section 6.3.2, “Encrypted Connection TLS Protocols and Ciphers”. • --tls-sni-servername=server_name ┌────────────────────┬──────────────────────────────────┐ │Command-Line Format │ --tls-sni-servername=server_name │ ├────────────────────┼──────────────────────────────────┤ │Type │ String │ └────────────────────┴──────────────────────────────────┘ When specified, the name is passed to the libmysqlclient C API library using the MYSQL_OPT_TLS_SNI_SERVERNAME option of mysql_options(). The server name is not case-sensitive. To show which server name the client specified for the current session, if any, check the Tls_sni_server_name status variable. Server Name Indication (SNI) is an extension to the TLS protocol (OpenSSL must be compiled using TLS extensions for this option to function). The MySQL implementation of SNI represents the client-side only. • --tls-version=protocol_list ┌────────────────────┬───────────────────────────────┐ │Command-Line Format │ --tls-version=protocol_list │ ├────────────────────┼───────────────────────────────┤ │Type │ String │ ├────────────────────┼───────────────────────────────┤ │Default Value │ TLSv1,TLSv1.1,TLSv1.2,TLSv1.3 │ │ │ (OpenSSL 1.1.1 or higher) │ │ │ TLSv1,TLSv1.1,TLSv1.2 │ │ │ (otherwise) │ └────────────────────┴───────────────────────────────┘ The permissible TLS protocols for encrypted connections. The value is a list of one or more comma-separated protocol names. The protocols that can be named for this option depend on the SSL library used to compile MySQL. For details, see Section 6.3.2, “Encrypted Connection TLS Protocols and Ciphers”. • --unbuffered, -n ┌────────────────────┬──────────────┐ │Command-Line Format │ --unbuffered │ └────────────────────┴──────────────┘ Flush the buffer after each query. • --user=user_name, -u user_name ┌────────────────────┬──────────────────┐ │Command-Line Format │ --user=user_name │ ├────────────────────┼──────────────────┤ │Type │ String │ └────────────────────┴──────────────────┘ The user name of the MySQL account to use for connecting to the server. • --verbose, -v ┌────────────────────┬───────────┐ │Command-Line Format │ --verbose │ └────────────────────┴───────────┘ Verbose mode. Produce more output about what the program does. This option can be given multiple times to produce more and more output. (For example, -v -v -v produces table output format even in batch mode.) • --version, -V ┌────────────────────┬───────────┐ │Command-Line Format │ --version │ └────────────────────┴───────────┘ Display version information and exit. • --vertical, -E ┌────────────────────┬────────────┐ │Command-Line Format │ --vertical │ └────────────────────┴────────────┘ Print query output rows vertically (one line per column value). Without this option, you can specify vertical output for individual statements by terminating them with \G. • --wait, -w ┌────────────────────┬────────┐ │Command-Line Format │ --wait │ └────────────────────┴────────┘ If the connection cannot be established, wait and retry instead of aborting. • --xml, -X ┌────────────────────┬───────┐ │Command-Line Format │ --xml │ └────────────────────┴───────┘ Produce XML output. <field name="column_name">NULL</field> The output when --xml is used with mysql matches that of mysqldump --xml. See mysqldump(1), for details. The XML output also uses an XML namespace, as shown here: $> mysql --xml -uroot -e "SHOW VARIABLES LIKE 'version%'" <?xml version="1.0"?> <resultset statement="SHOW VARIABLES LIKE 'version%'" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <row> <field name="Variable_name">version</field> <field name="Value">5.0.40-debug</field> </row> <row> <field name="Variable_name">version_comment</field> <field name="Value">Source distribution</field> </row> <row> <field name="Variable_name">version_compile_machine</field> <field name="Value">i686</field> </row> <row> <field name="Variable_name">version_compile_os</field> <field name="Value">suse-linux-gnu</field> </row> </resultset> • --zstd-compression-level=level ┌────────────────────┬────────────────────────────┐ │Command-Line Format │ --zstd-compression-level=# │ ├────────────────────┼────────────────────────────┤ │Type │ Integer │ └────────────────────┴────────────────────────────┘ The compression level to use for connections to the server that use the zstd compression algorithm. The permitted levels are from 1 to 22, with larger values indicating increasing levels of compression. The default zstd compression level is 3. The compression level setting has no effect on connections that do not use zstd compression. For more information, see Section 4.2.8, “Connection Compression Control”. • telemetry_client ┌────────────────────┬────────────────────┐ │Command-Line Format │ --telemetry_client │ ├────────────────────┼────────────────────┤ │Type │ Boolean │ ├────────────────────┼────────────────────┤ │Default Value │ OFF │ └────────────────────┴────────────────────┘ Enables the telemetry client plugin (Linux only). For more information, see Chapter 33, Telemetry. MYSQL CLIENT COMMANDS mysql sends each SQL statement that you issue to the server to be executed. There is also a set of commands that mysql itself interprets. For a list of these commands, type help or \h at the mysql> prompt: mysql> help List of all MySQL commands: Note that all text commands must be first on line and end with ';' ? (\?) Synonym for `help'. clear (\c) Clear the current input statement. connect (\r) Reconnect to the server. Optional arguments are db and host. delimiter (\d) Set statement delimiter. edit (\e) Edit command with $EDITOR. ego (\G) Send command to mysql server, display result vertically. exit (\q) Exit mysql. Same as quit. go (\g) Send command to mysql server. help (\h) Display this help. nopager (\n) Disable pager, print to stdout. notee (\t) Don't write into outfile. pager (\P) Set PAGER [to_pager]. Print the query results via PAGER. print (\p) Print current command. prompt (\R) Change your mysql prompt. quit (\q) Quit mysql. rehash (\#) Rebuild completion hash. source (\.) Execute an SQL script file. Takes a file name as an argument. status (\s) Get status information from the server. system (\!) Execute a system shell command. tee (\T) Set outfile [to_outfile]. Append everything into given outfile. use (\u) Use another database. Takes database name as argument. charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets. warnings (\W) Show warnings after every statement. nowarning (\w) Don't show warnings after every statement. resetconnection(\x) Clean session context. query_attributes Sets string parameters (name1 value1 name2 value2 ...) for the next query to pick up. ssl_session_data_print Serializes the current SSL session data to stdout or file. For server side help, type 'help contents' If mysql is invoked with the --binary-mode option, all mysql commands are disabled except charset and delimiter in noninteractive mode (for input piped to mysql or loaded using the source command). Each command has both a long and short form. The long form is not case-sensitive; the short form is. The long form can be followed by an optional semicolon terminator, but the short form should not. The use of short-form commands within multiple-line /* ... */ comments is not supported. Short-form commands do work within single-line /*! ... */ version comments, as do /*+ ... */ optimizer-hint comments, which are stored in object definitions. If there is a concern that optimizer-hint comments may be stored in object definitions so that dump files when reloaded with mysql would result in execution of such commands, either invoke mysql with the --binary-mode option or use a reload client other than mysql. • help [arg], \h [arg], \? [arg], ? [arg] Display a help message listing the available mysql commands. If you provide an argument to the help command, mysql uses it as a search string to access server-side help from the contents of the MySQL Reference Manual. For more information, see the section called “MYSQL CLIENT SERVER-SIDE HELP”. • charset charset_name, \C charset_name Change the default character set and issue a SET NAMES statement. This enables the character set to remain synchronized on the client and server if mysql is run with auto-reconnect enabled (which is not recommended), because the specified character set is used for reconnects. • clear, \c Clear the current input. Use this if you change your mind about executing the statement that you are entering. • connect [db_name [host_name]], \r [db_name [host_name]] Reconnect to the server. The optional database name and host name arguments may be given to specify the default database or the host where the server is running. If omitted, the current values are used. If the connect command specifies a host name argument, that host takes precedence over any --dns-srv-name option given at mysql startup to specify a DNS SRV record. • delimiter str, \d str Change the string that mysql interprets as the separator between SQL statements. The default is the semicolon character (;). The delimiter string can be specified as an unquoted or quoted argument on the delimiter command line. Quoting can be done with either single quote ('), double quote ("), or backtick (`) characters. To include a quote within a quoted string, either quote the string with a different quote character or escape the quote with a backslash (\) character. Backslash should be avoided outside of quoted strings because it is the escape character for MySQL. For an unquoted argument, the delimiter is read up to the first space or end of line. For a quoted argument, the delimiter is read up to the matching quote on the line. mysql interprets instances of the delimiter string as a statement delimiter anywhere it occurs, except within quoted strings. Be careful about defining a delimiter that might occur within other words. For example, if you define the delimiter as X, it is not possible to use the word INDEX in statements. mysql interprets this as INDE followed by the delimiter X. When the delimiter recognized by mysql is set to something other than the default of ;, instances of that character are sent to the server without interpretation. However, the server itself still interprets ; as a statement delimiter and processes statements accordingly. This behavior on the server side comes into play for multiple-statement execution (see Multiple Statement Execution Support[3]), and for parsing the body of stored procedures and functions, triggers, and events (see Section 25.1, “Defining Stored Programs”). • edit, \e Edit the current input statement. mysql checks the values of the EDITOR and VISUAL environment variables to determine which editor to use. The default editor is vi if neither variable is set. The edit command works only in Unix. • ego, \G Send the current statement to the server to be executed and display the result using vertical format. • exit, \q Exit mysql. • go, \g Send the current statement to the server to be executed. • nopager, \n Disable output paging. See the description for pager. The nopager command works only in Unix. • notee, \t Disable output copying to the tee file. See the description for tee. • nowarning, \w Disable display of warnings after each statement. • pager [command], \P [command] Enable output paging. By using the --pager option when you invoke mysql, it is possible to browse or search query results in interactive mode with Unix programs such as less, more, or any other similar program. If you specify no value for the option, mysql checks the value of the PAGER environment variable and sets the pager to that. Pager functionality works only in interactive mode. Output paging can be enabled interactively with the pager command and disabled with nopager. The command takes an optional argument; if given, the paging program is set to that. With no argument, the pager is set to the pager that was set on the command line, or stdout if no pager was specified. Output paging works only in Unix because it uses the popen() function, which does not exist on Windows. For Windows, the tee option can be used instead to save query output, although it is not as convenient as pager for browsing output in some situations. • print, \p Print the current input statement without executing it. • prompt [str], \R [str] Reconfigure the mysql prompt to the given string. The special character sequences that can be used in the prompt are described later in this section. If you specify the prompt command with no argument, mysql resets the prompt to the default of mysql>. • query_attributes name value [name value ...] Define query attributes that apply to the next query sent to the server. For discussion of the purpose and use of query attributes, see Section 9.6, “Query Attributes”. The query_attributes command follows these rules: • The format and quoting rules for attribute names and values are the same as for the delimiter command. • The command permits up to 32 attribute name/value pairs. Names and values may be up to 1024 characters long. If a name is given without a value, an error occurs. • If multiple query_attributes commands are issued prior to query execution, only the last command applies. After sending the query, mysql clears the attribute set. • If multiple attributes are defined with the same name, attempts to retrieve the attribute value have an undefined result. • An attribute defined with an empty name cannot be retrieved by name. • If a reconnect occurs while mysql executes the query, mysql restores the attributes after reconnecting so the query can be executed again with the same attributes. • quit, \q Exit mysql. • rehash, \# Rebuild the completion hash that enables database, table, and column name completion while you are entering statements. (See the description for the --auto-rehash option.) • resetconnection, \x Reset the connection to clear the session state. This includes clearing any current query attributes defined using the query_attributes command. Resetting a connection has effects similar to mysql_change_user() or an auto-reconnect except that the connection is not closed and reopened, and re-authentication is not done. See mysql_change_user()[4], and Automatic Reconnection Control[5]. This example shows how resetconnection clears a value maintained in the session state: mysql> SELECT LAST_INSERT_ID(3); +-------------------+ | LAST_INSERT_ID(3) | +-------------------+ | 3 | +-------------------+ mysql> SELECT LAST_INSERT_ID(); +------------------+ | LAST_INSERT_ID() | +------------------+ | 3 | +------------------+ mysql> resetconnection; mysql> SELECT LAST_INSERT_ID(); +------------------+ | LAST_INSERT_ID() | +------------------+ | 0 | +------------------+ • source file_name, \. file_name Read the named file and executes the statements contained therein. On Windows, specify path name separators as / or \\. Quote characters are taken as part of the file name itself. For best results, the name should not include space characters. • ssl_session_data_print [file_name] Fetches, serializes, and optionally stores the session data of a successful connection. The optional file name and arguments may be given to specify the file to store serialized session data. If omitted, the session data is printed to stdout. If the MySQL session is configured for reuse, session data from the file is deserialized and supplied to the connect command to reconnect. When the session is reused successfully, the status command contains a row showing SSL session reused: true while the client remains reconnected to the server. • status, \s Provide status information about the connection and the server you are using. If you are running with --safe-updates enabled, status also prints the values for the mysql variables that affect your queries. • system command, \! command Execute the given command using your default command interpreter. • tee [file_name], \T [file_name] By using the --tee option when you invoke mysql, you can log statements and their output. All the data displayed on the screen is appended into a given file. This can be very useful for debugging purposes also. mysql flushes results to the file after each statement, just before it prints its next prompt. Tee functionality works only in interactive mode. You can enable this feature interactively with the tee command. Without a parameter, the previous file is used. The tee file can be disabled with the notee command. Executing tee again re-enables logging. • use db_name, \u db_name Use db_name as the default database. • warnings, \W Enable display of warnings after each statement (if there are any). Here are a few tips about the pager command: • You can use it to write to a file and the results go only to the file: mysql> pager cat > /tmp/log.txt You can also pass any options for the program that you want to use as your pager: mysql> pager less -n -i -S • In the preceding example, note the -S option. You may find it very useful for browsing wide query results. Sometimes a very wide result set is difficult to read on the screen. The -S option to less can make the result set much more readable because you can scroll it horizontally using the left-arrow and right-arrow keys. You can also use -S interactively within less to switch the horizontal-browse mode on and off. For more information, read the less manual page: man less • The -F and -X options may be used with less to cause it to exit if output fits on one screen, which is convenient when no scrolling is necessary: mysql> pager less -n -i -S -F -X • You can specify very complex pager commands for handling query output: mysql> pager cat | tee /dr1/tmp/res.txt \ | tee /dr2/tmp/res2.txt | less -n -i -S In this example, the command would send query results to two files in two different directories on two different file systems mounted on /dr1 and /dr2, yet still display the results onscreen using less. You can also combine the tee and pager functions. Have a tee file enabled and pager set to less, and you are able to browse the results using the less program and still have everything appended into a file the same time. The difference between the Unix tee used with the pager command and the mysql built-in tee command is that the built-in tee works even if you do not have the Unix tee available. The built-in tee also logs everything that is printed on the screen, whereas the Unix tee used with pager does not log quite that much. Additionally, tee file logging can be turned on and off interactively from within mysql. This is useful when you want to log some queries to a file, but not others. The prompt command reconfigures the default mysql> prompt. The string for defining the prompt can contain the following special sequences. ┌───────┬────────────────────────────┐ │Option │ Description │ ├───────┼────────────────────────────┤ │ │ The current connection │ │ │ identifier │ ├───────┼────────────────────────────┤ │ │ A counter that increments │ │ │ for each statement you │ │ │ issue │ ├───────┼────────────────────────────┤ │ │ The full current date │ ├───────┼────────────────────────────┤ │ │ The default database │ ├───────┼────────────────────────────┤ │ │ The server host │ ├───────┼────────────────────────────┤ │ │ The current delimiter │ ├───────┼────────────────────────────┤ │ │ Minutes of the current │ │ │ time │ ├───────┼────────────────────────────┤ │ │ A newline character │ ├───────┼────────────────────────────┤ │ │ The current month in │ │ │ three-letter format (Jan, │ │ │ Feb, ...) │ ├───────┼────────────────────────────┤ │ │ The current month in │ │ │ numeric format │ ├───────┼────────────────────────────┤ │P │ am/pm │ ├───────┼────────────────────────────┤ │ │ The current TCP/IP port or │ │ │ socket file │ ├───────┼────────────────────────────┤ │ │ The current time, in │ │ │ 24-hour military time │ │ │ (0–23) │ ├───────┼────────────────────────────┤ │ │ The current time, standard │ │ │ 12-hour time (1–12) │ ├───────┼────────────────────────────┤ │ │ Semicolon │ ├───────┼────────────────────────────┤ │ │ Seconds of the current │ │ │ time │ ├───────┼────────────────────────────┤ │T │ Print an asterisk (*) if │ │ │ the current session is │ │ │ inside a transaction block │ ├───────┼────────────────────────────┤ │ │ A tab character │ ├───────┼────────────────────────────┤ │U │ Your full │ │ │ user_name@host_name │ │ │ account name │ ├───────┼────────────────────────────┤ │ │ Your user name │ ├───────┼────────────────────────────┤ │ │ The server version │ ├───────┼────────────────────────────┤ │0 │ The current day of the │ │ │ week in three-letter │ │ │ format (Mon, Tue, ...) │ ├───────┼────────────────────────────┤ │ │ The current year, four │ │ │ digits │ ├───────┼────────────────────────────┤ │y │ The current year, two │ │ │ digits │ ├───────┼────────────────────────────┤ │_ │ A space │ ├───────┼────────────────────────────┤ │\ │ A space (a space follows │ │ │ the backslash) │ ├───────┼────────────────────────────┤ │´ │ Single quote │ ├───────┼────────────────────────────┤ │ │ Double quote │ ├───────┼────────────────────────────┤ │\ │ A literal backslash │ │ │ character │ ├───────┼────────────────────────────┤ │\fIx │ x, for any “x” not listed │ │ │ above │ └───────┴────────────────────────────┘ You can set the prompt in several ways: • Use an environment variable. You can set the MYSQL_PS1 environment variable to a prompt string. For example: export MYSQL_PS1="(\u@\h) [\d]> " • Use a command-line option. You can set the --prompt option on the command line to mysql. For example: $> mysql --prompt="(\u@\h) [\d]> " (user@host) [database]> • Use an option file. You can set the prompt option in the [mysql] group of any MySQL option file, such as /etc/my.cnf or the .my.cnf file in your home directory. For example: [mysql] prompt=(\\u@\\h) [\\d]>\\_ In this example, note that the backslashes are doubled. If you set the prompt using the prompt option in an option file, it is advisable to double the backslashes when using the special prompt options. There is some overlap in the set of permissible prompt options and the set of special escape sequences that are recognized in option files. (The rules for escape sequences in option files are listed in Section 4.2.2.2, “Using Option Files”.) The overlap may cause you problems if you use single backslashes. For example, \s is interpreted as a space rather than as the current seconds value. The following example shows how to define a prompt within an option file to include the current time in hh:mm:ss> format: [mysql] prompt="\\r:\\m:\\s> " • Set the prompt interactively. You can change your prompt interactively by using the prompt (or \R) command. For example: mysql> prompt (\u@\h) [\d]>\_ PROMPT set to '(\u@\h) [\d]>\_' (user@host) [database]> (user@host) [database]> prompt Returning to default PROMPT of mysql> mysql> MYSQL CLIENT LOGGING The mysql client can do these types of logging for statements executed interactively: • On Unix, mysql writes the statements to a history file. By default, this file is named .mysql_history in your home directory. To specify a different file, set the value of the MYSQL_HISTFILE environment variable. • On all platforms, if the --syslog option is given, mysql writes the statements to the system logging facility. On Unix, this is syslog; on Windows, it is the Windows Event Log. The destination where logged messages appear is system dependent. On Linux, the destination is often the /var/log/messages file. The following discussion describes characteristics that apply to all logging types and provides information specific to each logging type. • How Logging Occurs • Controlling the History File • syslog Logging Characteristics How Logging Occurs For each enabled logging destination, statement logging occurs as follows: • Statements are logged only when executed interactively. Statements are noninteractive, for example, when read from a file or a pipe. It is also possible to suppress statement logging by using the --batch or --execute option. • Statements are ignored and not logged if they match any pattern in the “ignore” list. This list is described later. • mysql logs each nonignored, nonempty statement line individually. • If a nonignored statement spans multiple lines (not including the terminating delimiter), mysql concatenates the lines to form the complete statement, maps newlines to spaces, and logs the result, plus a delimiter. Consequently, an input statement that spans multiple lines can be logged twice. Consider this input: mysql> SELECT -> 'Today is' -> , -> CURDATE() -> ; In this case, mysql logs the “SELECT”, “'Today is'”, “,”, “CURDATE()”, and “;” lines as it reads them. It also logs the complete statement, after mapping SELECT\n'Today is'\n,\nCURDATE() to SELECT 'Today is' , CURDATE(), plus a delimiter. Thus, these lines appear in logged output: SELECT 'Today is' , CURDATE() ; SELECT 'Today is' , CURDATE(); mysql ignores for logging purposes statements that match any pattern in the “ignore” list. By default, the pattern list is "*IDENTIFIED*:*PASSWORD*", to ignore statements that refer to passwords. Pattern matching is not case-sensitive. Within patterns, two characters are special: • ? matches any single character. • * matches any sequence of zero or more characters. To specify additional patterns, use the --histignore option or set the MYSQL_HISTIGNORE environment variable. (If both are specified, the option value takes precedence.) The value should be a list of one or more colon-separated patterns, which are appended to the default pattern list. Patterns specified on the command line might need to be quoted or escaped to prevent your command interpreter from treating them specially. For example, to suppress logging for UPDATE and DELETE statements in addition to statements that refer to passwords, invoke mysql like this: mysql --histignore="*UPDATE*:*DELETE*" Controlling the History File The .mysql_history file should be protected with a restrictive access mode because sensitive information might be written to it, such as the text of SQL statements that contain passwords. See Section 6.1.2.1, “End-User Guidelines for Password Security”. Statements in the file are accessible from the mysql client when the up-arrow key is used to recall the history. See Disabling Interactive History. If you do not want to maintain a history file, first remove .mysql_history if it exists. Then use either of the following techniques to prevent it from being created again: • Set the MYSQL_HISTFILE environment variable to /dev/null. To cause this setting to take effect each time you log in, put it in one of your shell's startup files. • Create .mysql_history as a symbolic link to /dev/null; this need be done only once: ln -s /dev/null $HOME/.mysql_history syslog Logging Characteristics If the --syslog option is given, mysql writes interactive statements to the system logging facility. Message logging has the following characteristics. Logging occurs at the “information” level. This corresponds to the LOG_INFO priority for syslog on Unix/Linux syslog capability and to EVENTLOG_INFORMATION_TYPE for the Windows Event Log. Consult your system documentation for configuration of your logging capability. Message size is limited to 1024 bytes. Messages consist of the identifier MysqlClient followed by these values: • SYSTEM_USER The operating system user name (login name) or -- if the user is unknown. • MYSQL_USER The MySQL user name (specified with the --user option) or -- if the user is unknown. • CONNECTION_ID: The client connection identifier. This is the same as the CONNECTION_ID() function value within the session. • DB_SERVER The server host or -- if the host is unknown. • DB The default database or -- if no database has been selected. • QUERY The text of the logged statement. Here is a sample of output generated on Linux by using --syslog. This output is formatted for readability; each logged message actually takes a single line. Mar 7 12:39:25 myhost MysqlClient[20824]: SYSTEM_USER:'oscar', MYSQL_USER:'my_oscar', CONNECTION_ID:23, DB_SERVER:'127.0.0.1', DB:'--', QUERY:'USE test;' Mar 7 12:39:28 myhost MysqlClient[20824]: SYSTEM_USER:'oscar', MYSQL_USER:'my_oscar', CONNECTION_ID:23, DB_SERVER:'127.0.0.1', DB:'test', QUERY:'SHOW TABLES;' MYSQL CLIENT SERVER-SIDE HELP mysql> help search_string If you provide an argument to the help command, mysql uses it as a search string to access server-side help from the contents of the MySQL Reference Manual. The proper operation of this command requires that the help tables in the mysql database be initialized with help topic information (see Section 5.1.17, “Server-Side Help Support”). If there is no match for the search string, the search fails: mysql> help me Nothing found Please try to run 'help contents' for a list of all accessible topics Use help contents to see a list of the help categories: mysql> help contents You asked for help about help category: "Contents" For more information, type 'help <item>', where <item> is one of the following categories: Account Management Administration Data Definition Data Manipulation Data Types Functions Functions and Modifiers for Use with GROUP BY Geographic Features Language Structure Plugins Storage Engines Stored Routines Table Maintenance Transactions Triggers If the search string matches multiple items, mysql shows a list of matching topics: mysql> help logs Many help items for your request exist. To make a more specific request, please type 'help <item>', where <item> is one of the following topics: SHOW SHOW BINARY LOGS SHOW ENGINE SHOW LOGS Use a topic as the search string to see the help entry for that topic: mysql> help show binary logs Name: 'SHOW BINARY LOGS' Description: Syntax: SHOW BINARY LOGS SHOW MASTER LOGS Lists the binary log files on the server. This statement is used as part of the procedure described in [purge-binary-logs], that shows how to determine which logs can be purged. mysql> SHOW BINARY LOGS; +---------------+-----------+-----------+ | Log_name | File_size | Encrypted | +---------------+-----------+-----------+ | binlog.000015 | 724935 | Yes | | binlog.000016 | 733481 | Yes | +---------------+-----------+-----------+ The search string can contain the wildcard characters % and _. These have the same meaning as for pattern-matching operations performed with the LIKE operator. For example, HELP rep% returns a list of topics that begin with rep: mysql> HELP rep% Many help items for your request exist. To make a more specific request, please type 'help <item>', where <item> is one of the following topics: REPAIR TABLE REPEAT FUNCTION REPEAT LOOP REPLACE REPLACE FUNCTION EXECUTING SQL STATEMENTS FROM A TEXT FILE The mysql client typically is used interactively, like this: mysql db_name However, it is also possible to put your SQL statements in a file and then tell mysql to read its input from that file. To do so, create a text file text_file that contains the statements you wish to execute. Then invoke mysql as shown here: mysql db_name < text_file If you place a USE db_name statement as the first statement in the file, it is unnecessary to specify the database name on the command line: mysql < text_file If you are already running mysql, you can execute an SQL script file using the source command or \. command: mysql> source file_name mysql> \. file_name Sometimes you may want your script to display progress information to the user. For this you can insert statements like this: SELECT '<info_to_display>' AS ' '; The statement shown outputs <info_to_display>. You can also invoke mysql with the --verbose option, which causes each statement to be displayed before the result that it produces. mysql ignores Unicode byte order mark (BOM) characters at the beginning of input files. Previously, it read them and sent them to the server, resulting in a syntax error. Presence of a BOM does not cause mysql to change its default character set. To do that, invoke mysql with an option such as --default-character-set=utf8mb4. For more information about batch mode, see Section 3.5, “Using mysql in Batch Mode”. MYSQL CLIENT TIPS This section provides information about techniques for more effective use of mysql and about mysql operational behavior. • Input-Line Editing • Disabling Interactive History • Unicode Support on Windows • Displaying Query Results Vertically • Using Safe-Updates Mode (--safe-updates) • Disabling mysql Auto-Reconnect • mysql Client Parser Versus Server Parser Input-Line Editing mysql supports input-line editing, which enables you to modify the current input line in place or recall previous input lines. For example, the left-arrow and right-arrow keys move horizontally within the current input line, and the up-arrow and down-arrow keys move up and down through the set of previously entered lines. Backspace deletes the character before the cursor and typing new characters enters them at the cursor position. To enter the line, press Enter. On Windows, the editing key sequences are the same as supported for command editing in console windows. On Unix, the key sequences depend on the input library used to build mysql (for example, the libedit or readline library). Documentation for the libedit and readline libraries is available online. To change the set of key sequences permitted by a given input library, define key bindings in the library startup file. This is a file in your home directory: .editrc for libedit and .inputrc for readline. For example, in libedit, Control+W deletes everything before the current cursor position and Control+U deletes the entire line. In readline, Control+W deletes the word before the cursor and Control+U deletes everything before the current cursor position. If mysql was built using libedit, a user who prefers the readline behavior for these two keys can put the following lines in the .editrc file (creating the file if necessary): bind "^W" ed-delete-prev-word bind "^U" vi-kill-line-prev To see the current set of key bindings, temporarily put a line that says only bind at the end of .editrc. mysql shows the bindings when it starts. Disabling Interactive History The up-arrow key enables you to recall input lines from current and previous sessions. In cases where a console is shared, this behavior may be unsuitable. mysql supports disabling the interactive history partially or fully, depending on the host platform. On Windows, the history is stored in memory. Alt+F7 deletes all input lines stored in memory for the current history buffer. It also deletes the list of sequential numbers in front of the input lines displayed with F7 and recalled (by number) with F9. New input lines entered after you press Alt+F7 repopulate the current history buffer. Clearing the buffer does not prevent logging to the Windows Event Viewer, if the --syslog option was used to start mysql. Closing the console window also clears the current history buffer. To disable interactive history on Unix, first delete the .mysql_history file, if it exists (previous entries are recalled otherwise). Then start mysql with the --histignore="*" option to ignore all new input lines. To re-enable the recall (and logging) behavior, restart mysql without the option. If you prevent the .mysql_history file from being created (see Controlling the History File) and use --histignore="*" to start the mysql client, the interactive history recall facility is disabled fully. Alternatively, if you omit the --histignore option, you can recall the input lines entered during the current session. Unicode Support on Windows Windows provides APIs based on UTF-16LE for reading from and writing to the console; the mysql client for Windows is able to use these APIs. The Windows installer creates an item in the MySQL menu named MySQL command line client - Unicode. This item invokes the mysql client with properties set to communicate through the console to the MySQL server using Unicode. To take advantage of this support manually, run mysql within a console that uses a compatible Unicode font and set the default character set to a Unicode character set that is supported for communication with the server: 1. Open a console window. 2. Go to the console window properties, select the font tab, and choose Lucida Console or some other compatible Unicode font. This is necessary because console windows start by default using a DOS raster font that is inadequate for Unicode. 3. Execute mysql.exe with the --default-character-set=utf8mb4 (or utf8mb3) option. This option is necessary because utf16le is one of the character sets that cannot be used as the client character set. See the section called “Impermissible Client Character Sets”. With those changes, mysql uses the Windows APIs to communicate with the console using UTF-16LE, and communicate with the server using UTF-8. (The menu item mentioned previously sets the font and character set as just described.) To avoid those steps each time you run mysql, you can create a shortcut that invokes mysql.exe. The shortcut should set the console font to Lucida Console or some other compatible Unicode font, and pass the --default-character-set=utf8mb4 (or utf8mb3) option to mysql.exe. Alternatively, create a shortcut that only sets the console font, and set the character set in the [mysql] group of your my.ini file: [mysql] default-character-set=utf8mb4 # or utf8mb3 Displaying Query Results Vertically Some query results are much more readable when displayed vertically, instead of in the usual horizontal table format. Queries can be displayed vertically by terminating the query with \G instead of a semicolon. For example, longer text values that include newlines often are much easier to read with vertical output: mysql> SELECT * FROM mails WHERE LENGTH(txt) < 300 LIMIT 300,1\G *************************** 1. row *************************** msg_nro: 3068 date: 2000-03-01 23:29:50 time_zone: +0200 mail_from: Jones reply: jones@example.com mail_to: "John Smith" <smith@example.com> sbj: UTF-8 txt: >>>>> "John" == John Smith writes: John> Hi. I think this is a good idea. Is anyone familiar John> with UTF-8 or Unicode? Otherwise, I'll put this on my John> TODO list and see what happens. Yes, please do that. Regards, Jones file: inbox-jani-1 hash: 190402944 1 row in set (0.09 sec) Using Safe-Updates Mode (--safe-updates) For beginners, a useful startup option is --safe-updates (or --i-am-a-dummy, which has the same effect). Safe-updates mode is helpful for cases when you might have issued an UPDATE or DELETE statement but forgotten the WHERE clause indicating which rows to modify. Normally, such statements update or delete all rows in the table. With --safe-updates, you can modify rows only by specifying the key values that identify them, or a LIMIT clause, or both. This helps prevent accidents. Safe-updates mode also restricts SELECT statements that produce (or are estimated to produce) very large result sets. The --safe-updates option causes mysql to execute the following statement when it connects to the MySQL server, to set the session values of the sql_safe_updates, sql_select_limit, and max_join_size system variables: SET sql_safe_updates=1, sql_select_limit=1000, max_join_size=1000000; The SET statement affects statement processing as follows: • Enabling sql_safe_updates causes UPDATE and DELETE statements to produce an error if they do not specify a key constraint in the WHERE clause, or provide a LIMIT clause, or both. For example: UPDATE tbl_name SET not_key_column=val WHERE key_column=val; UPDATE tbl_name SET not_key_column=val LIMIT 1; • Setting sql_select_limit to 1,000 causes the server to limit all SELECT result sets to 1,000 rows unless the statement includes a LIMIT clause. • Setting max_join_size to 1,000,000 causes multiple-table SELECT statements to produce an error if the server estimates it must examine more than 1,000,000 row combinations. To specify result set limits different from 1,000 and 1,000,000, you can override the defaults by using the --select-limit and --max-join-size options when you invoke mysql: mysql --safe-updates --select-limit=500 --max-join-size=10000 It is possible for UPDATE and DELETE statements to produce an error in safe-updates mode even with a key specified in the WHERE clause, if the optimizer decides not to use the index on the key column: • Range access on the index cannot be used if memory usage exceeds that permitted by the range_optimizer_max_mem_size system variable. The optimizer then falls back to a table scan. See the section called “Limiting Memory Use for Range Optimization”. • If key comparisons require type conversion, the index may not be used (see Section 8.3.1, “How MySQL Uses Indexes”). Suppose that an indexed string column c1 is compared to a numeric value using WHERE c1 = 2222. For such comparisons, the string value is converted to a number and the operands are compared numerically (see Section 12.3, “Type Conversion in Expression Evaluation”), preventing use of the index. If safe-updates mode is enabled, an error occurs. These behaviors are included in safe-updates mode: • EXPLAIN with UPDATE and DELETE statements does not produce safe-updates errors. This enables use of EXPLAIN plus SHOW WARNINGS to see why an index is not used, which can be helpful in cases such as when a range_optimizer_max_mem_size violation or type conversion occurs and the optimizer does not use an index even though a key column was specified in the WHERE clause. • When a safe-updates error occurs, the error message includes the first diagnostic that was produced, to provide information about the reason for failure. For example, the message may indicate that the range_optimizer_max_mem_size value was exceeded or type conversion occurred, either of which can preclude use of an index. • For multiple-table deletes and updates, an error is produced with safe updates enabled only if any target table uses a table scan. Disabling mysql Auto-Reconnect If the mysql client loses its connection to the server while sending a statement, it immediately and automatically tries to reconnect once to the server and send the statement again. However, even if mysql succeeds in reconnecting, your first connection has ended and all your previous session objects and settings are lost: temporary tables, the autocommit mode, and user-defined and session variables. Also, any current transaction rolls back. This behavior may be dangerous for you, as in the following example where the server was shut down and restarted between the first and second statements without you knowing it: mysql> SET @a=1; Query OK, 0 rows affected (0.05 sec) mysql> INSERT INTO t VALUES(@a); ERROR 2006: MySQL server has gone away No connection. Trying to reconnect... Connection id: 1 Current database: test Query OK, 1 row affected (1.30 sec) mysql> SELECT * FROM t; +------+ | a | +------+ | NULL | +------+ 1 row in set (0.05 sec) The @a user variable has been lost with the connection, and after the reconnection it is undefined. If it is important to have mysql terminate with an error if the connection has been lost, you can start the mysql client with the --skip-reconnect option. For more information about auto-reconnect and its effect on state information when a reconnection occurs, see Automatic Reconnection Control[5]. mysql Client Parser Versus Server Parser The mysql client uses a parser on the client side that is not a duplicate of the complete parser used by the mysqld server on the server side. This can lead to differences in treatment of certain constructs. Examples: • The server parser treats strings delimited by " characters as identifiers rather than as plain strings if the ANSI_QUOTES SQL mode is enabled. The mysql client parser does not take the ANSI_QUOTES SQL mode into account. It treats strings delimited by ", ', and ` characters the same, regardless of whether ANSI_QUOTES is enabled. • Within /*! ... */ and /*+ ... */ comments, the mysql client parser interprets short-form mysql commands. The server parser does not interpret them because these commands have no meaning on the server side. If it is desirable for mysql not to interpret short-form commands within comments, a partial workaround is to use the --binary-mode option, which causes all mysql commands to be disabled except \C and \d in noninteractive mode (for input piped to mysql or loaded using the source command). COPYRIGHT Copyright © 1997, 2023, Oracle and/or its affiliates. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. NOTES 1. MySQL Shell 8.2 https://dev.mysql.com/doc/mysql-shell/8.1/en/ 2. C API Basic Data Structures https://dev.mysql.com/doc/c-api/8.2/en/c-api-data-structures.html 3. Multiple Statement Execution Support https://dev.mysql.com/doc/c-api/8.2/en/c-api-multiple-queries.html 4. mysql_change_user() https://dev.mysql.com/doc/c-api/8.2/en/mysql-change-user.html 5. Automatic Reconnection Control https://dev.mysql.com/doc/c-api/8.2/en/c-api-auto-reconnect.html SEE ALSO For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. AUTHOR Oracle Corporation (http://dev.mysql.com/). MySQL 8.3 11/23/2023 MYSQL(1)
|
mysql - the MySQL command-line client
|
mysql [options] db_name
| null | null |
pcre2-config
|
pcre2-config returns the configuration of the installed PCRE2 libraries and the options required to compile a program to use them. Some of the options apply only to the 8-bit, or 16-bit, or 32-bit libraries, respectively, and are not available for libraries that have not been built. If an unavailable option is encountered, the "usage" information is output.
|
pcre2-config - program to return PCRE2 configuration
|
pcre2-config [--prefix] [--exec-prefix] [--version] [--libs8] [--libs16] [--libs32] [--libs-posix] [--cflags] [--cflags-posix]
|
--prefix Writes the directory prefix used in the PCRE2 installation for architecture independent files (/usr on many systems, /usr/local on some systems) to the standard output. --exec-prefix Writes the directory prefix used in the PCRE2 installation for architecture dependent files (normally the same as --prefix) to the standard output. --version Writes the version number of the installed PCRE2 libraries to the standard output. --libs8 Writes to the standard output the command line options required to link with the 8-bit PCRE2 library (-lpcre2-8 on many systems). --libs16 Writes to the standard output the command line options required to link with the 16-bit PCRE2 library (-lpcre2-16 on many systems). --libs32 Writes to the standard output the command line options required to link with the 32-bit PCRE2 library (-lpcre2-32 on many systems). --libs-posix Writes to the standard output the command line options required to link with PCRE2's POSIX API wrapper library (-lpcre2-posix -lpcre2-8 on many systems). --cflags Writes to the standard output the command line options required to compile files that use PCRE2 (this may include some -I options, but is blank on many systems). --cflags-posix Writes to the standard output the command line options required to compile files that use PCRE2's POSIX API wrapper library (this may include some -I options, but is blank on many systems). SEE ALSO pcre2(3) AUTHOR This manual page was originally written by Mark Baker for the Debian GNU/Linux system. It has been subsequently revised as a generic PCRE2 man page. REVISION Last updated: 28 September 2014 PCRE2 10.00 28 September 2014 PCRE2-CONFIG(1)
| null |
gd2topng
| null | null | null | null | null |
missing_codec_desc
| null | null | null | null | null |
watchgnupg
|
Most of the main utilities are able to write their log files to a Unix Domain socket if configured that way. watchgnupg is a simple listener for such a socket. It ameliorates the output with a time stamp and makes sure that long lines are not interspersed with log output from other utilities. This tool is not available for Windows. watchgnupg is commonly invoked as watchgnupg which is a shorthand for watchgnupg --force $(gpgconf --list-dirs socketdir)/S.log To watch GnuPG running with a different home directory, use watchgnupg --homedir DIR
|
watchgnupg - Read and print logs from a socket
|
watchgnupg [--force] [--verbose] socketname
|
watchgnupg understands these options: --force Delete an already existing socket file. This option is implicitly used if no socket name has been given on the command line. --homedir DIR If no socket name is given on the command line, pass DIR to gpgconf so that the socket for a GnuPG running with DIR has its home directory is used. Note that the environment variable GNUPGHOME is ignored by watchgnupg. --tcp n Instead of reading from a local socket, listen for connects on TCP port n. A Unix domain socket can optionally also be given as a second source. This option does not use a default socket name. --time-only Do not print the date part of the timestamp. --verbose Enable extra informational output. --version Print version of the program and exit. --help Display a brief help page and exit.
|
$ watchgnupg --time-only This waits for connections on the local socket (e.g. ‘/var/run/user/1234/gnupg/S.log’) and shows all log entries. To make this work the option log-file needs to be used with all modules which logs are to be shown. The suggested entry for the configuration files is: log-file socket:// If the default socket as given above and returned by "echo $(gpgconf –list-dirs socketdir)/S.log" is not desired an arbitrary socket name can be specified, for example ‘socket:///home/foo/bar/mysocket’. For debugging purposes it is also possible to do remote logging. Take care if you use this feature because the information is send in the clear over the network. Use this syntax in the conf files: log-file tcp://192.168.1.1:4711 You may use any port and not just 4711 as shown above; only IP addresses are supported (v4 and v6) and no host names. You need to start watchgnupg with the tcp option. Note that under Windows the registry entry HKCU\Software\GNU\GnuPG:DefaultLogFile can be used to change the default log output from stderr to whatever is given by that entry. However the only useful entry is a TCP name for remote debugging. SEE ALSO gpg(1), gpgsm(1), gpg-agent(1), scdaemon(1) The full documentation for this tool is maintained as a Texinfo manual. If GnuPG and the info program are properly installed at your site, the command info gnupg should give you access to the complete manual including a menu structure and an index. GnuPG 2.4.5 2024-03-04 WATCHGNUPG(1)
|
gcsplit
|
Output pieces of FILE separated by PATTERN(s) to files 'xx00', 'xx01', ..., and output byte counts of each piece to standard output. Read standard input if FILE is - Mandatory arguments to long options are mandatory for short options too. -b, --suffix-format=FORMAT use sprintf FORMAT instead of %02d -f, --prefix=PREFIX use PREFIX instead of 'xx' -k, --keep-files do not remove output files on errors --suppress-matched suppress the lines matching PATTERN -n, --digits=DIGITS use specified number of digits instead of 2 -s, --quiet, --silent do not print counts of output file sizes -z, --elide-empty-files suppress empty output files --help display this help and exit --version output version information and exit Each PATTERN may be: INTEGER copy up to but not including specified line number /REGEXP/[OFFSET] copy up to but not including a matching line %REGEXP%[OFFSET] skip to, but not including a matching line {INTEGER} repeat the previous pattern specified number of times {*} repeat the previous pattern as many times as possible A line OFFSET is an integer optionally preceded by '+' or '-' AUTHOR Written by Stuart Kemp and David MacKenzie. REPORTING BUGS GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Report any translation bugs to <https://translationproject.org/team/> COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO Full documentation <https://www.gnu.org/software/coreutils/csplit> or available locally via: info '(coreutils) csplit invocation' GNU coreutils 9.3 April 2023 CSPLIT(1)
|
csplit - split a file into sections determined by context lines
|
csplit [OPTION]... FILE PATTERN...
| null | null |
pygmentize
| null | null | null | null | null |
xzcat
|
xz is a general-purpose data compression tool with command line syntax similar to gzip(1) and bzip2(1). The native file format is the .xz format, but the legacy .lzma format used by LZMA Utils and raw compressed streams with no container format headers are also supported. In addition, decompression of the .lz format used by lzip is supported. xz compresses or decompresses each file according to the selected operation mode. If no files are given or file is -, xz reads from standard input and writes the processed data to standard output. xz will refuse (display an error and skip the file) to write compressed data to standard output if it is a terminal. Similarly, xz will refuse to read compressed data from standard input if it is a terminal. Unless --stdout is specified, files other than - are written to a new file whose name is derived from the source file name: • When compressing, the suffix of the target file format (.xz or .lzma) is appended to the source filename to get the target filename. • When decompressing, the .xz, .lzma, or .lz suffix is removed from the filename to get the target filename. xz also recognizes the suffixes .txz and .tlz, and replaces them with the .tar suffix. If the target file already exists, an error is displayed and the file is skipped. Unless writing to standard output, xz will display a warning and skip the file if any of the following applies: • File is not a regular file. Symbolic links are not followed, and thus they are not considered to be regular files. • File has more than one hard link. • File has setuid, setgid, or sticky bit set. • The operation mode is set to compress and the file already has a suffix of the target file format (.xz or .txz when compressing to the .xz format, and .lzma or .tlz when compressing to the .lzma format). • The operation mode is set to decompress and the file doesn't have a suffix of any of the supported file formats (.xz, .txz, .lzma, .tlz, or .lz). After successfully compressing or decompressing the file, xz copies the owner, group, permissions, access time, and modification time from the source file to the target file. If copying the group fails, the permissions are modified so that the target file doesn't become accessible to users who didn't have permission to access the source file. xz doesn't support copying other metadata like access control lists or extended attributes yet. Once the target file has been successfully closed, the source file is removed unless --keep was specified. The source file is never removed if the output is written to standard output or if an error occurs. Sending SIGINFO or SIGUSR1 to the xz process makes it print progress information to standard error. This has only limited use since when standard error is a terminal, using --verbose will display an automatically updating progress indicator. Memory usage The memory usage of xz varies from a few hundred kilobytes to several gigabytes depending on the compression settings. The settings used when compressing a file determine the memory requirements of the decompressor. Typically the decompressor needs 5 % to 20 % of the amount of memory that the compressor needed when creating the file. For example, decompressing a file created with xz -9 currently requires 65 MiB of memory. Still, it is possible to have .xz files that require several gigabytes of memory to decompress. Especially users of older systems may find the possibility of very large memory usage annoying. To prevent uncomfortable surprises, xz has a built-in memory usage limiter, which is disabled by default. While some operating systems provide ways to limit the memory usage of processes, relying on it wasn't deemed to be flexible enough (for example, using ulimit(1) to limit virtual memory tends to cripple mmap(2)). The memory usage limiter can be enabled with the command line option --memlimit=limit. Often it is more convenient to enable the limiter by default by setting the environment variable XZ_DEFAULTS, for example, XZ_DEFAULTS=--memlimit=150MiB. It is possible to set the limits separately for compression and decompression by using --memlimit-compress=limit and --memlimit-decompress=limit. Using these two options outside XZ_DEFAULTS is rarely useful because a single run of xz cannot do both compression and decompression and --memlimit=limit (or -M limit) is shorter to type on the command line. If the specified memory usage limit is exceeded when decompressing, xz will display an error and decompressing the file will fail. If the limit is exceeded when compressing, xz will try to scale the settings down so that the limit is no longer exceeded (except when using --format=raw or --no-adjust). This way the operation won't fail unless the limit is very small. The scaling of the settings is done in steps that don't match the compression level presets, for example, if the limit is only slightly less than the amount required for xz -9, the settings will be scaled down only a little, not all the way down to xz -8. Concatenation and padding with .xz files It is possible to concatenate .xz files as is. xz will decompress such files as if they were a single .xz file. It is possible to insert padding between the concatenated parts or after the last part. The padding must consist of null bytes and the size of the padding must be a multiple of four bytes. This can be useful, for example, if the .xz file is stored on a medium that measures file sizes in 512-byte blocks. Concatenation and padding are not allowed with .lzma files or raw streams.
|
xz, unxz, xzcat, lzma, unlzma, lzcat - Compress or decompress .xz and .lzma files
|
xz [option...] [file...] COMMAND ALIASES unxz is equivalent to xz --decompress. xzcat is equivalent to xz --decompress --stdout. lzma is equivalent to xz --format=lzma. unlzma is equivalent to xz --format=lzma --decompress. lzcat is equivalent to xz --format=lzma --decompress --stdout. When writing scripts that need to decompress files, it is recommended to always use the name xz with appropriate arguments (xz -d or xz -dc) instead of the names unxz and xzcat.
|
Integer suffixes and special values In most places where an integer argument is expected, an optional suffix is supported to easily indicate large integers. There must be no space between the integer and the suffix. KiB Multiply the integer by 1,024 (2^10). Ki, k, kB, K, and KB are accepted as synonyms for KiB. MiB Multiply the integer by 1,048,576 (2^20). Mi, m, M, and MB are accepted as synonyms for MiB. GiB Multiply the integer by 1,073,741,824 (2^30). Gi, g, G, and GB are accepted as synonyms for GiB. The special value max can be used to indicate the maximum integer value supported by the option. Operation mode If multiple operation mode options are given, the last one takes effect. -z, --compress Compress. This is the default operation mode when no operation mode option is specified and no other operation mode is implied from the command name (for example, unxz implies --decompress). -d, --decompress, --uncompress Decompress. -t, --test Test the integrity of compressed files. This option is equivalent to --decompress --stdout except that the decompressed data is discarded instead of being written to standard output. No files are created or removed. -l, --list Print information about compressed files. No uncompressed output is produced, and no files are created or removed. In list mode, the program cannot read the compressed data from standard input or from other unseekable sources. The default listing shows basic information about files, one file per line. To get more detailed information, use also the --verbose option. For even more information, use --verbose twice, but note that this may be slow, because getting all the extra information requires many seeks. The width of verbose output exceeds 80 characters, so piping the output to, for example, less -S may be convenient if the terminal isn't wide enough. The exact output may vary between xz versions and different locales. For machine-readable output, --robot --list should be used. Operation modifiers -k, --keep Don't delete the input files. Since xz 5.2.6, this option also makes xz compress or decompress even if the input is a symbolic link to a regular file, has more than one hard link, or has the setuid, setgid, or sticky bit set. The setuid, setgid, and sticky bits are not copied to the target file. In earlier versions this was only done with --force. -f, --force This option has several effects: • If the target file already exists, delete it before compressing or decompressing. • Compress or decompress even if the input is a symbolic link to a regular file, has more than one hard link, or has the setuid, setgid, or sticky bit set. The setuid, setgid, and sticky bits are not copied to the target file. • When used with --decompress --stdout and xz cannot recognize the type of the source file, copy the source file as is to standard output. This allows xzcat --force to be used like cat(1) for files that have not been compressed with xz. Note that in future, xz might support new compressed file formats, which may make xz decompress more types of files instead of copying them as is to standard output. --format=format can be used to restrict xz to decompress only a single file format. -c, --stdout, --to-stdout Write the compressed or decompressed data to standard output instead of a file. This implies --keep. --single-stream Decompress only the first .xz stream, and silently ignore possible remaining input data following the stream. Normally such trailing garbage makes xz display an error. xz never decompresses more than one stream from .lzma files or raw streams, but this option still makes xz ignore the possible trailing data after the .lzma file or raw stream. This option has no effect if the operation mode is not --decompress or --test. --no-sparse Disable creation of sparse files. By default, if decompressing into a regular file, xz tries to make the file sparse if the decompressed data contains long sequences of binary zeros. It also works when writing to standard output as long as standard output is connected to a regular file and certain additional conditions are met to make it safe. Creating sparse files may save disk space and speed up the decompression by reducing the amount of disk I/O. -S .suf, --suffix=.suf When compressing, use .suf as the suffix for the target file instead of .xz or .lzma. If not writing to standard output and the source file already has the suffix .suf, a warning is displayed and the file is skipped. When decompressing, recognize files with the suffix .suf in addition to files with the .xz, .txz, .lzma, .tlz, or .lz suffix. If the source file has the suffix .suf, the suffix is removed to get the target filename. When compressing or decompressing raw streams (--format=raw), the suffix must always be specified unless writing to standard output, because there is no default suffix for raw streams. --files[=file] Read the filenames to process from file; if file is omitted, filenames are read from standard input. Filenames must be terminated with the newline character. A dash (-) is taken as a regular filename; it doesn't mean standard input. If filenames are given also as command line arguments, they are processed before the filenames read from file. --files0[=file] This is identical to --files[=file] except that each filename must be terminated with the null character. Basic file format and compression options -F format, --format=format Specify the file format to compress or decompress: auto This is the default. When compressing, auto is equivalent to xz. When decompressing, the format of the input file is automatically detected. Note that raw streams (created with --format=raw) cannot be auto- detected. xz Compress to the .xz file format, or accept only .xz files when decompressing. lzma, alone Compress to the legacy .lzma file format, or accept only .lzma files when decompressing. The alternative name alone is provided for backwards compatibility with LZMA Utils. lzip Accept only .lz files when decompressing. Compression is not supported. The .lz format version 0 and the unextended version 1 are supported. Version 0 files were produced by lzip 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in lzip 1.18. lzip 1.4 and later create files in the format version 1. The sync flush marker extension to the format version 1 was added in lzip 1.6. This extension is rarely used and isn't supported by xz (diagnosed as corrupt input). raw Compress or uncompress a raw stream (no headers). This is meant for advanced users only. To decode raw streams, you need use --format=raw and explicitly specify the filter chain, which normally would have been stored in the container headers. -C check, --check=check Specify the type of the integrity check. The check is calculated from the uncompressed data and stored in the .xz file. This option has an effect only when compressing into the .xz format; the .lzma format doesn't support integrity checks. The integrity check (if any) is verified when the .xz file is decompressed. Supported check types: none Don't calculate an integrity check at all. This is usually a bad idea. This can be useful when integrity of the data is verified by other means anyway. crc32 Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet). crc64 Calculate CRC64 using the polynomial from ECMA-182. This is the default, since it is slightly better than CRC32 at detecting damaged files and the speed difference is negligible. sha256 Calculate SHA-256. This is somewhat slower than CRC32 and CRC64. Integrity of the .xz headers is always verified with CRC32. It is not possible to change or disable it. --ignore-check Don't verify the integrity check of the compressed data when decompressing. The CRC32 values in the .xz headers will still be verified normally. Do not use this option unless you know what you are doing. Possible reasons to use this option: • Trying to recover data from a corrupt .xz file. • Speeding up decompression. This matters mostly with SHA-256 or with files that have compressed extremely well. It's recommended to not use this option for this purpose unless the file integrity is verified externally in some other way. -0 ... -9 Select a compression preset level. The default is -6. If multiple preset levels are specified, the last one takes effect. If a custom filter chain was already specified, setting a compression preset level clears the custom filter chain. The differences between the presets are more significant than with gzip(1) and bzip2(1). The selected compression settings determine the memory requirements of the decompressor, thus using a too high preset level might make it painful to decompress the file on an old system with little RAM. Specifically, it's not a good idea to blindly use -9 for everything like it often is with gzip(1) and bzip2(1). -0 ... -3 These are somewhat fast presets. -0 is sometimes faster than gzip -9 while compressing much better. The higher ones often have speed comparable to bzip2(1) with comparable or better compression ratio, although the results depend a lot on the type of data being compressed. -4 ... -6 Good to very good compression while keeping decompressor memory usage reasonable even for old systems. -6 is the default, which is usually a good choice for distributing files that need to be decompressible even on systems with only 16 MiB RAM. (-5e or -6e may be worth considering too. See --extreme.) -7 ... -9 These are like -6 but with higher compressor and decompressor memory requirements. These are useful only when compressing files bigger than 8 MiB, 16 MiB, and 32 MiB, respectively. On the same hardware, the decompression speed is approximately a constant number of bytes of compressed data per second. In other words, the better the compression, the faster the decompression will usually be. This also means that the amount of uncompressed output produced per second can vary a lot. The following table summarises the features of the presets: Preset DictSize CompCPU CompMem DecMem -0 256 KiB 0 3 MiB 1 MiB -1 1 MiB 1 9 MiB 2 MiB -2 2 MiB 2 17 MiB 3 MiB -3 4 MiB 3 32 MiB 5 MiB -4 4 MiB 4 48 MiB 5 MiB -5 8 MiB 5 94 MiB 9 MiB -6 8 MiB 6 94 MiB 9 MiB -7 16 MiB 6 186 MiB 17 MiB -8 32 MiB 6 370 MiB 33 MiB -9 64 MiB 6 674 MiB 65 MiB Column descriptions: • DictSize is the LZMA2 dictionary size. It is waste of memory to use a dictionary bigger than the size of the uncompressed file. This is why it is good to avoid using the presets -7 ... -9 when there's no real need for them. At -6 and lower, the amount of memory wasted is usually low enough to not matter. • CompCPU is a simplified representation of the LZMA2 settings that affect compression speed. The dictionary size affects speed too, so while CompCPU is the same for levels -6 ... -9, higher levels still tend to be a little slower. To get even slower and thus possibly better compression, see --extreme. • CompMem contains the compressor memory requirements in the single-threaded mode. It may vary slightly between xz versions. • DecMem contains the decompressor memory requirements. That is, the compression settings determine the memory requirements of the decompressor. The exact decompressor memory usage is slightly more than the LZMA2 dictionary size, but the values in the table have been rounded up to the next full MiB. Memory requirements of the multi-threaded mode are significantly higher than that of the single-threaded mode. With the default value of --block-size, each thread needs 3*3*DictSize plus CompMem or DecMem. For example, four threads with preset -6 needs 660–670 MiB of memory. -e, --extreme Use a slower variant of the selected compression preset level (-0 ... -9) to hopefully get a little bit better compression ratio, but with bad luck this can also make it worse. Decompressor memory usage is not affected, but compressor memory usage increases a little at preset levels -0 ... -3. Since there are two presets with dictionary sizes 4 MiB and 8 MiB, the presets -3e and -5e use slightly faster settings (lower CompCPU) than -4e and -6e, respectively. That way no two presets are identical. Preset DictSize CompCPU CompMem DecMem -0e 256 KiB 8 4 MiB 1 MiB -1e 1 MiB 8 13 MiB 2 MiB -2e 2 MiB 8 25 MiB 3 MiB -3e 4 MiB 7 48 MiB 5 MiB -4e 4 MiB 8 48 MiB 5 MiB -5e 8 MiB 7 94 MiB 9 MiB -6e 8 MiB 8 94 MiB 9 MiB -7e 16 MiB 8 186 MiB 17 MiB -8e 32 MiB 8 370 MiB 33 MiB -9e 64 MiB 8 674 MiB 65 MiB For example, there are a total of four presets that use 8 MiB dictionary, whose order from the fastest to the slowest is -5, -6, -5e, and -6e. --fast --best These are somewhat misleading aliases for -0 and -9, respectively. These are provided only for backwards compatibility with LZMA Utils. Avoid using these options. --block-size=size When compressing to the .xz format, split the input data into blocks of size bytes. The blocks are compressed independently from each other, which helps with multi-threading and makes limited random-access decompression possible. This option is typically used to override the default block size in multi- threaded mode, but this option can be used in single-threaded mode too. In multi-threaded mode about three times size bytes will be allocated in each thread for buffering input and output. The default size is three times the LZMA2 dictionary size or 1 MiB, whichever is more. Typically a good value is 2–4 times the size of the LZMA2 dictionary or at least 1 MiB. Using size less than the LZMA2 dictionary size is waste of RAM because then the LZMA2 dictionary buffer will never get fully used. In multi-threaded mode, the sizes of the blocks are stored in the block headers. This size information is required for multi-threaded decompression. In single-threaded mode no block splitting is done by default. Setting this option doesn't affect memory usage. No size information is stored in block headers, thus files created in single-threaded mode won't be identical to files created in multi-threaded mode. The lack of size information also means that xz won't be able decompress the files in multi-threaded mode. --block-list=items When compressing to the .xz format, start a new block with an optional custom filter chain after the given intervals of uncompressed data. The items are a comma-separated list. Each item consists of an optional filter chain number between 0 and 9 followed by a colon (:) and a required size of uncompressed data. Omitting an item (two or more consecutive commas) is a shorthand to use the size and filters of the previous item. If the input file is bigger than the sum of the sizes in items, the last item is repeated until the end of the file. A special value of 0 may be used as the last size to indicate that the rest of the file should be encoded as a single block. An alternative filter chain for each block can be specified in combination with the --filters1=filters ... --filters9=filters options. These options define filter chains with an identifier between 1–9. Filter chain 0 can be used to refer to the default filter chain, which is the same as not specifying a filter chain. The filter chain identifier can be used before the uncompressed size, followed by a colon (:). For example, if one specifies --block-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB then blocks will be created using: • The filter chain specified by --filters1 and 2 MiB input • The filter chain specified by --filters3 and 2 MiB input • The filter chain specified by --filters2 and 4 MiB input • The filter chain specified by --filters2 and 4 MiB input • The default filter chain and 2 MiB input • The default filter chain and 4 MiB input for every block until end of input. If one specifies a size that exceeds the encoder's block size (either the default value in threaded mode or the value specified with --block-size=size), the encoder will create additional blocks while keeping the boundaries specified in items. For example, if one specifies --block-size=10MiB --block-list=5MiB,10MiB,8MiB,12MiB,24MiB and the input file is 80 MiB, one will get 11 blocks: 5, 10, 8, 10, 2, 10, 10, 4, 10, 10, and 1 MiB. In multi-threaded mode the sizes of the blocks are stored in the block headers. This isn't done in single-threaded mode, so the encoded output won't be identical to that of the multi-threaded mode. --flush-timeout=timeout When compressing, if more than timeout milliseconds (a positive integer) has passed since the previous flush and reading more input would block, all the pending input data is flushed from the encoder and made available in the output stream. This can be useful if xz is used to compress data that is streamed over a network. Small timeout values make the data available at the receiving end with a small delay, but large timeout values give better compression ratio. This feature is disabled by default. If this option is specified more than once, the last one takes effect. The special timeout value of 0 can be used to explicitly disable this feature. This feature is not available on non-POSIX systems. This feature is still experimental. Currently xz is unsuitable for decompressing the stream in real time due to how xz does buffering. --memlimit-compress=limit Set a memory usage limit for compression. If this option is specified multiple times, the last one takes effect. If the compression settings exceed the limit, xz will attempt to adjust the settings downwards so that the limit is no longer exceeded and display a notice that automatic adjustment was done. The adjustments are done in this order: reducing the number of threads, switching to single-threaded mode if even one thread in multi-threaded mode exceeds the limit, and finally reducing the LZMA2 dictionary size. When compressing with --format=raw or if --no-adjust has been specified, only the number of threads may be reduced since it can be done without affecting the compressed output. If the limit cannot be met even with the adjustments described above, an error is displayed and xz will exit with exit status 1. The limit can be specified in multiple ways: • The limit can be an absolute value in bytes. Using an integer suffix like MiB can be useful. Example: --memlimit-compress=80MiB • The limit can be specified as a percentage of total physical memory (RAM). This can be useful especially when setting the XZ_DEFAULTS environment variable in a shell initialization script that is shared between different computers. That way the limit is automatically bigger on systems with more memory. Example: --memlimit-compress=70% • The limit can be reset back to its default value by setting it to 0. This is currently equivalent to setting the limit to max (no memory usage limit). For 32-bit xz there is a special case: if the limit would be over 4020 MiB, the limit is set to 4020 MiB. On MIPS32 2000 MiB is used instead. (The values 0 and max aren't affected by this. A similar feature doesn't exist for decompression.) This can be helpful when a 32-bit executable has access to 4 GiB address space (2 GiB on MIPS32) while hopefully doing no harm in other situations. See also the section Memory usage. --memlimit-decompress=limit Set a memory usage limit for decompression. This also affects the --list mode. If the operation is not possible without exceeding the limit, xz will display an error and decompressing the file will fail. See --memlimit-compress=limit for possible ways to specify the limit. --memlimit-mt-decompress=limit Set a memory usage limit for multi-threaded decompression. This can only affect the number of threads; this will never make xz refuse to decompress a file. If limit is too low to allow any multi-threading, the limit is ignored and xz will continue in single-threaded mode. Note that if also --memlimit-decompress is used, it will always apply to both single-threaded and multi- threaded modes, and so the effective limit for multi-threading will never be higher than the limit set with --memlimit-decompress. In contrast to the other memory usage limit options, --memlimit-mt-decompress=limit has a system-specific default limit. xz --info-memory can be used to see the current value. This option and its default value exist because without any limit the threaded decompressor could end up allocating an insane amount of memory with some input files. If the default limit is too low on your system, feel free to increase the limit but never set it to a value larger than the amount of usable RAM as with appropriate input files xz will attempt to use that amount of memory even with a low number of threads. Running out of memory or swapping will not improve decompression performance. See --memlimit-compress=limit for possible ways to specify the limit. Setting limit to 0 resets the limit to the default system-specific value. -M limit, --memlimit=limit, --memory=limit This is equivalent to specifying --memlimit-compress=limit --memlimit-decompress=limit --memlimit-mt-decompress=limit. --no-adjust Display an error and exit if the memory usage limit cannot be met without adjusting settings that affect the compressed output. That is, this prevents xz from switching the encoder from multi-threaded mode to single-threaded mode and from reducing the LZMA2 dictionary size. Even when this option is used the number of threads may be reduced to meet the memory usage limit as that won't affect the compressed output. Automatic adjusting is always disabled when creating raw streams (--format=raw). -T threads, --threads=threads Specify the number of worker threads to use. Setting threads to a special value 0 makes xz use up to as many threads as the processor(s) on the system support. The actual number of threads can be fewer than threads if the input file is not big enough for threading with the given settings or if using more threads would exceed the memory usage limit. The single-threaded and multi-threaded compressors produce different output. Single-threaded compressor will give the smallest file size but only the output from the multi-threaded compressor can be decompressed using multiple threads. Setting threads to 1 will use the single-threaded mode. Setting threads to any other value, including 0, will use the multi-threaded compressor even if the system supports only one hardware thread. (xz 5.2.x used single-threaded mode in this situation.) To use multi-threaded mode with only one thread, set threads to +1. The + prefix has no effect with values other than 1. A memory usage limit can still make xz switch to single-threaded mode unless --no-adjust is used. Support for the + prefix was added in xz 5.4.0. If an automatic number of threads has been requested and no memory usage limit has been specified, then a system-specific default soft limit will be used to possibly limit the number of threads. It is a soft limit in sense that it is ignored if the number of threads becomes one, thus a soft limit will never stop xz from compressing or decompressing. This default soft limit will not make xz switch from multi-threaded mode to single- threaded mode. The active limits can be seen with xz --info-memory. Currently the only threading method is to split the input into blocks and compress them independently from each other. The default block size depends on the compression level and can be overridden with the --block-size=size option. Threaded decompression only works on files that contain multiple blocks with size information in block headers. All large enough files compressed in multi-threaded mode meet this condition, but files compressed in single-threaded mode don't even if --block-size=size has been used. The default value for threads is 0. In xz 5.4.x and older the default is 1. Custom compressor filter chains A custom filter chain allows specifying the compression settings in detail instead of relying on the settings associated to the presets. When a custom filter chain is specified, preset options (-0 ... -9 and --extreme) earlier on the command line are forgotten. If a preset option is specified after one or more custom filter chain options, the new preset takes effect and the custom filter chain options specified earlier are forgotten. A filter chain is comparable to piping on the command line. When compressing, the uncompressed input goes to the first filter, whose output goes to the next filter (if any). The output of the last filter gets written to the compressed file. The maximum number of filters in the chain is four, but typically a filter chain has only one or two filters. Many filters have limitations on where they can be in the filter chain: some filters can work only as the last filter in the chain, some only as a non-last filter, and some work in any position in the chain. Depending on the filter, this limitation is either inherent to the filter design or exists to prevent security issues. A custom filter chain can be specified in two different ways. The options --filters=filters and --filters1=filters ... --filters9=filters allow specifying an entire filter chain in one option using the liblzma filter string syntax. Alternatively, a filter chain can be specified by using one or more individual filter options in the order they are wanted in the filter chain. That is, the order of the individual filter options is significant! When decoding raw streams (--format=raw), the filter chain must be specified in the same order as it was specified when compressing. Any individual filter or preset options specified before the full chain option (--filters=filters) will be forgotten. Individual filters specified after the full chain option will reset the filter chain. Both the full and individual filter options take filter-specific options as a comma-separated list. Extra commas in options are ignored. Every option has a default value, so specify those you want to change. To see the whole filter chain and options, use xz -vv (that is, use --verbose twice). This works also for viewing the filter chain options used by presets. --filters=filters Specify the full filter chain or a preset in a single option. Each filter can be separated by spaces or two dashes (--). filters may need to be quoted on the shell command line so it is parsed as a single option. To denote options, use : or =. A preset can be prefixed with a - and followed with zero or more flags. The only supported flag is e to apply the same options as --extreme. --filters1=filters ... --filters9=filters Specify up to nine additional filter chains that can be used with --block-list. For example, when compressing an archive with executable files followed by text files, the executable part could use a filter chain with a BCJ filter and the text part only the LZMA2 filter. --filters-help Display a help message describing how to specify presets and custom filter chains in the --filters and --filters1=filters ... --filters9=filters options, and exit successfully. --lzma1[=options] --lzma2[=options] Add LZMA1 or LZMA2 filter to the filter chain. These filters can be used only as the last filter in the chain. LZMA1 is a legacy filter, which is supported almost solely due to the legacy .lzma file format, which supports only LZMA1. LZMA2 is an updated version of LZMA1 to fix some practical issues of LZMA1. The .xz format uses LZMA2 and doesn't support LZMA1 at all. Compression speed and ratios of LZMA1 and LZMA2 are practically the same. LZMA1 and LZMA2 share the same set of options: preset=preset Reset all LZMA1 or LZMA2 options to preset. Preset consist of an integer, which may be followed by single- letter preset modifiers. The integer can be from 0 to 9, matching the command line options -0 ... -9. The only supported modifier is currently e, which matches --extreme. If no preset is specified, the default values of LZMA1 or LZMA2 options are taken from the preset 6. dict=size Dictionary (history buffer) size indicates how many bytes of the recently processed uncompressed data is kept in memory. The algorithm tries to find repeating byte sequences (matches) in the uncompressed data, and replace them with references to the data currently in the dictionary. The bigger the dictionary, the higher is the chance to find a match. Thus, increasing dictionary size usually improves compression ratio, but a dictionary bigger than the uncompressed file is waste of memory. Typical dictionary size is from 64 KiB to 64 MiB. The minimum is 4 KiB. The maximum for compression is currently 1.5 GiB (1536 MiB). The decompressor already supports dictionaries up to one byte less than 4 GiB, which is the maximum for the LZMA1 and LZMA2 stream formats. Dictionary size and match finder (mf) together determine the memory usage of the LZMA1 or LZMA2 encoder. The same (or bigger) dictionary size is required for decompressing that was used when compressing, thus the memory usage of the decoder is determined by the dictionary size used when compressing. The .xz headers store the dictionary size either as 2^n or 2^n + 2^(n-1), so these sizes are somewhat preferred for compression. Other sizes will get rounded up when stored in the .xz headers. lc=lc Specify the number of literal context bits. The minimum is 0 and the maximum is 4; the default is 3. In addition, the sum of lc and lp must not exceed 4. All bytes that cannot be encoded as matches are encoded as literals. That is, literals are simply 8-bit bytes that are encoded one at a time. The literal coding makes an assumption that the highest lc bits of the previous uncompressed byte correlate with the next byte. For example, in typical English text, an upper-case letter is often followed by a lower-case letter, and a lower-case letter is usually followed by another lower-case letter. In the US-ASCII character set, the highest three bits are 010 for upper-case letters and 011 for lower-case letters. When lc is at least 3, the literal coding can take advantage of this property in the uncompressed data. The default value (3) is usually good. If you want maximum compression, test lc=4. Sometimes it helps a little, and sometimes it makes compression worse. If it makes it worse, test lc=2 too. lp=lp Specify the number of literal position bits. The minimum is 0 and the maximum is 4; the default is 0. Lp affects what kind of alignment in the uncompressed data is assumed when encoding literals. See pb below for more information about alignment. pb=pb Specify the number of position bits. The minimum is 0 and the maximum is 4; the default is 2. Pb affects what kind of alignment in the uncompressed data is assumed in general. The default means four-byte alignment (2^pb=2^2=4), which is often a good choice when there's no better guess. When the alignment is known, setting pb accordingly may reduce the file size a little. For example, with text files having one-byte alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can improve compression slightly. For UTF-16 text, pb=1 is a good choice. If the alignment is an odd number like 3 bytes, pb=0 might be the best choice. Even though the assumed alignment can be adjusted with pb and lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment. It might be worth taking into account when designing file formats that are likely to be often compressed with LZMA1 or LZMA2. mf=mf Match finder has a major effect on encoder speed, memory usage, and compression ratio. Usually Hash Chain match finders are faster than Binary Tree match finders. The default depends on the preset: 0 uses hc3, 1–3 use hc4, and the rest use bt4. The following match finders are supported. The memory usage formulas below are rough approximations, which are closest to the reality when dict is a power of two. hc3 Hash Chain with 2- and 3-byte hashing Minimum value for nice: 3 Memory usage: dict * 7.5 (if dict <= 16 MiB); dict * 5.5 + 64 MiB (if dict > 16 MiB) hc4 Hash Chain with 2-, 3-, and 4-byte hashing Minimum value for nice: 4 Memory usage: dict * 7.5 (if dict <= 32 MiB); dict * 6.5 (if dict > 32 MiB) bt2 Binary Tree with 2-byte hashing Minimum value for nice: 2 Memory usage: dict * 9.5 bt3 Binary Tree with 2- and 3-byte hashing Minimum value for nice: 3 Memory usage: dict * 11.5 (if dict <= 16 MiB); dict * 9.5 + 64 MiB (if dict > 16 MiB) bt4 Binary Tree with 2-, 3-, and 4-byte hashing Minimum value for nice: 4 Memory usage: dict * 11.5 (if dict <= 32 MiB); dict * 10.5 (if dict > 32 MiB) mode=mode Compression mode specifies the method to analyze the data produced by the match finder. Supported modes are fast and normal. The default is fast for presets 0–3 and normal for presets 4–9. Usually fast is used with Hash Chain match finders and normal with Binary Tree match finders. This is also what the presets do. nice=nice Specify what is considered to be a nice length for a match. Once a match of at least nice bytes is found, the algorithm stops looking for possibly better matches. Nice can be 2–273 bytes. Higher values tend to give better compression ratio at the expense of speed. The default depends on the preset. depth=depth Specify the maximum search depth in the match finder. The default is the special value of 0, which makes the compressor determine a reasonable depth from mf and nice. Reasonable depth for Hash Chains is 4–100 and 16–1000 for Binary Trees. Using very high values for depth can make the encoder extremely slow with some files. Avoid setting the depth over 1000 unless you are prepared to interrupt the compression in case it is taking far too long. When decoding raw streams (--format=raw), LZMA2 needs only the dictionary size. LZMA1 needs also lc, lp, and pb. --x86[=options] --arm[=options] --armthumb[=options] --arm64[=options] --powerpc[=options] --ia64[=options] --sparc[=options] --riscv[=options] Add a branch/call/jump (BCJ) filter to the filter chain. These filters can be used only as a non-last filter in the filter chain. A BCJ filter converts relative addresses in the machine code to their absolute counterparts. This doesn't change the size of the data but it increases redundancy, which can help LZMA2 to produce 0–15 % smaller .xz file. The BCJ filters are always reversible, so using a BCJ filter for wrong type of data doesn't cause any data loss, although it may make the compression ratio slightly worse. The BCJ filters are very fast and use an insignificant amount of memory. These BCJ filters have known problems related to the compression ratio: • Some types of files containing executable code (for example, object files, static libraries, and Linux kernel modules) have the addresses in the instructions filled with filler values. These BCJ filters will still do the address conversion, which will make the compression worse with these files. • If a BCJ filter is applied on an archive, it is possible that it makes the compression ratio worse than not using a BCJ filter. For example, if there are similar or even identical executables then filtering will likely make the files less similar and thus compression is worse. The contents of non- executable files in the same archive can matter too. In practice one has to try with and without a BCJ filter to see which is better in each situation. Different instruction sets have different alignment: the executable file must be aligned to a multiple of this value in the input data to make the filter work. Filter Alignment Notes x86 1 32-bit or 64-bit x86 ARM 4 ARM-Thumb 2 ARM64 4 4096-byte alignment is best PowerPC 4 Big endian only IA-64 16 Itanium SPARC 4 RISC-V 2 Since the BCJ-filtered data is usually compressed with LZMA2, the compression ratio may be improved slightly if the LZMA2 options are set to match the alignment of the selected BCJ filter. Examples: • IA-64 filter has 16-byte alignment so pb=4,lp=4,lc=0 is good with LZMA2 (2^4=16). • RISC-V code has 2-byte or 4-byte alignment depending on whether the file contains 16-bit compressed instructions (the C extension). When 16-bit instructions are used, pb=2,lp=1,lc=3 or pb=1,lp=1,lc=3 is good. When 16-bit instructions aren't present, pb=2,lp=2,lc=2 is the best. readelf -h can be used to check if "RVC" appears on the "Flags" line. • ARM64 is always 4-byte aligned so pb=2,lp=2,lc=2 is the best. • The x86 filter is an exception. It's usually good to stick to LZMA2's defaults (pb=2,lp=0,lc=3) when compressing x86 executables. All BCJ filters support the same options: start=offset Specify the start offset that is used when converting between relative and absolute addresses. The offset must be a multiple of the alignment of the filter (see the table above). The default is zero. In practice, the default is good; specifying a custom offset is almost never useful. --delta[=options] Add the Delta filter to the filter chain. The Delta filter can be only used as a non-last filter in the filter chain. Currently only simple byte-wise delta calculation is supported. It can be useful when compressing, for example, uncompressed bitmap images or uncompressed PCM audio. However, special purpose algorithms may give significantly better results than Delta + LZMA2. This is true especially with audio, which compresses faster and better, for example, with flac(1). Supported options: dist=distance Specify the distance of the delta calculation in bytes. distance must be 1–256. The default is 1. For example, with dist=2 and eight-byte input A1 B1 A2 B3 A3 B5 A4 B7, the output will be A1 B1 01 02 01 02 01 02. Other options -q, --quiet Suppress warnings and notices. Specify this twice to suppress errors too. This option has no effect on the exit status. That is, even if a warning was suppressed, the exit status to indicate a warning is still used. -v, --verbose Be verbose. If standard error is connected to a terminal, xz will display a progress indicator. Specifying --verbose twice will give even more verbose output. The progress indicator shows the following information: • Completion percentage is shown if the size of the input file is known. That is, the percentage cannot be shown in pipes. • Amount of compressed data produced (compressing) or consumed (decompressing). • Amount of uncompressed data consumed (compressing) or produced (decompressing). • Compression ratio, which is calculated by dividing the amount of compressed data processed so far by the amount of uncompressed data processed so far. • Compression or decompression speed. This is measured as the amount of uncompressed data consumed (compression) or produced (decompression) per second. It is shown after a few seconds have passed since xz started processing the file. • Elapsed time in the format M:SS or H:MM:SS. • Estimated remaining time is shown only when the size of the input file is known and a couple of seconds have already passed since xz started processing the file. The time is shown in a less precise format which never has any colons, for example, 2 min 30 s. When standard error is not a terminal, --verbose will make xz print the filename, compressed size, uncompressed size, compression ratio, and possibly also the speed and elapsed time on a single line to standard error after compressing or decompressing the file. The speed and elapsed time are included only when the operation took at least a few seconds. If the operation didn't finish, for example, due to user interruption, also the completion percentage is printed if the size of the input file is known. -Q, --no-warn Don't set the exit status to 2 even if a condition worth a warning was detected. This option doesn't affect the verbosity level, thus both --quiet and --no-warn have to be used to not display warnings and to not alter the exit status. --robot Print messages in a machine-parsable format. This is intended to ease writing frontends that want to use xz instead of liblzma, which may be the case with various scripts. The output with this option enabled is meant to be stable across xz releases. See the section ROBOT MODE for details. --info-memory Display, in human-readable format, how much physical memory (RAM) and how many processor threads xz thinks the system has and the memory usage limits for compression and decompression, and exit successfully. -h, --help Display a help message describing the most commonly used options, and exit successfully. -H, --long-help Display a help message describing all features of xz, and exit successfully -V, --version Display the version number of xz and liblzma in human readable format. To get machine-parsable output, specify --robot before --version. ROBOT MODE The robot mode is activated with the --robot option. It makes the output of xz easier to parse by other programs. Currently --robot is supported only together with --list, --filters-help, --info-memory, and --version. It will be supported for compression and decompression in the future. List mode xz --robot --list uses tab-separated output. The first column of every line has a string that indicates the type of the information found on that line: name This is always the first line when starting to list a file. The second column on the line is the filename. file This line contains overall information about the .xz file. This line is always printed after the name line. stream This line type is used only when --verbose was specified. There are as many stream lines as there are streams in the .xz file. block This line type is used only when --verbose was specified. There are as many block lines as there are blocks in the .xz file. The block lines are shown after all the stream lines; different line types are not interleaved. summary This line type is used only when --verbose was specified twice. This line is printed after all block lines. Like the file line, the summary line contains overall information about the .xz file. totals This line is always the very last line of the list output. It shows the total counts and sizes. The columns of the file lines: 2. Number of streams in the file 3. Total number of blocks in the stream(s) 4. Compressed size of the file 5. Uncompressed size of the file 6. Compression ratio, for example, 0.123. If ratio is over 9.999, three dashes (---) are displayed instead of the ratio. 7. Comma-separated list of integrity check names. The following strings are used for the known check types: None, CRC32, CRC64, and SHA-256. For unknown check types, Unknown-N is used, where N is the Check ID as a decimal number (one or two digits). 8. Total size of stream padding in the file The columns of the stream lines: 2. Stream number (the first stream is 1) 3. Number of blocks in the stream 4. Compressed start offset 5. Uncompressed start offset 6. Compressed size (does not include stream padding) 7. Uncompressed size 8. Compression ratio 9. Name of the integrity check 10. Size of stream padding The columns of the block lines: 2. Number of the stream containing this block 3. Block number relative to the beginning of the stream (the first block is 1) 4. Block number relative to the beginning of the file 5. Compressed start offset relative to the beginning of the file 6. Uncompressed start offset relative to the beginning of the file 7. Total compressed size of the block (includes headers) 8. Uncompressed size 9. Compression ratio 10. Name of the integrity check If --verbose was specified twice, additional columns are included on the block lines. These are not displayed with a single --verbose, because getting this information requires many seeks and can thus be slow: 11. Value of the integrity check in hexadecimal 12. Block header size 13. Block flags: c indicates that compressed size is present, and u indicates that uncompressed size is present. If the flag is not set, a dash (-) is shown instead to keep the string length fixed. New flags may be added to the end of the string in the future. 14. Size of the actual compressed data in the block (this excludes the block header, block padding, and check fields) 15. Amount of memory (in bytes) required to decompress this block with this xz version 16. Filter chain. Note that most of the options used at compression time cannot be known, because only the options that are needed for decompression are stored in the .xz headers. The columns of the summary lines: 2. Amount of memory (in bytes) required to decompress this file with this xz version 3. yes or no indicating if all block headers have both compressed size and uncompressed size stored in them Since xz 5.1.2alpha: 4. Minimum xz version required to decompress the file The columns of the totals line: 2. Number of streams 3. Number of blocks 4. Compressed size 5. Uncompressed size 6. Average compression ratio 7. Comma-separated list of integrity check names that were present in the files 8. Stream padding size 9. Number of files. This is here to keep the order of the earlier columns the same as on file lines. If --verbose was specified twice, additional columns are included on the totals line: 10. Maximum amount of memory (in bytes) required to decompress the files with this xz version 11. yes or no indicating if all block headers have both compressed size and uncompressed size stored in them Since xz 5.1.2alpha: 12. Minimum xz version required to decompress the file Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed. Filters help xz --robot --filters-help prints the supported filters in the following format: filter:option=<value>,option=<value>... filter Name of the filter option Name of a filter specific option value Numeric value ranges appear as <min-max>. String value choices are shown within < > and separated by a | character. Each filter is printed on its own line. Memory limit information xz --robot --info-memory prints a single line with multiple tab- separated columns: 1. Total amount of physical memory (RAM) in bytes. 2. Memory usage limit for compression in bytes (--memlimit-compress). A special value of 0 indicates the default setting which for single-threaded mode is the same as no limit. 3. Memory usage limit for decompression in bytes (--memlimit-decompress). A special value of 0 indicates the default setting which for single-threaded mode is the same as no limit. 4. Since xz 5.3.4alpha: Memory usage for multi-threaded decompression in bytes (--memlimit-mt-decompress). This is never zero because a system-specific default value shown in the column 5 is used if no limit has been specified explicitly. This is also never greater than the value in the column 3 even if a larger value has been specified with --memlimit-mt-decompress. 5. Since xz 5.3.4alpha: A system-specific default memory usage limit that is used to limit the number of threads when compressing with an automatic number of threads (--threads=0) and no memory usage limit has been specified (--memlimit-compress). This is also used as the default value for --memlimit-mt-decompress. 6. Since xz 5.3.4alpha: Number of available processor threads. In the future, the output of xz --robot --info-memory may have more columns, but never more than a single line. Version xz --robot --version prints the version number of xz and liblzma in the following format: XZ_VERSION=XYYYZZZS LIBLZMA_VERSION=XYYYZZZS X Major version. YYY Minor version. Even numbers are stable. Odd numbers are alpha or beta versions. ZZZ Patch level for stable releases or just a counter for development releases. S Stability. 0 is alpha, 1 is beta, and 2 is stable. S should be always 2 when YYY is even. XYYYZZZS are the same on both lines if xz and liblzma are from the same XZ Utils release. Examples: 4.999.9beta is 49990091 and 5.0.0 is 50000002. EXIT STATUS 0 All is good. 1 An error occurred. 2 Something worth a warning occurred, but no actual errors occurred. Notices (not warnings or errors) printed on standard error don't affect the exit status. ENVIRONMENT xz parses space-separated lists of options from the environment variables XZ_DEFAULTS and XZ_OPT, in this order, before parsing the options from the command line. Note that only options are parsed from the environment variables; all non-options are silently ignored. Parsing is done with getopt_long(3) which is used also for the command line arguments. XZ_DEFAULTS User-specific or system-wide default options. Typically this is set in a shell initialization script to enable xz's memory usage limiter by default. Excluding shell initialization scripts and similar special cases, scripts must never set or unset XZ_DEFAULTS. XZ_OPT This is for passing options to xz when it is not possible to set the options directly on the xz command line. This is the case when xz is run by a script or tool, for example, GNU tar(1): XZ_OPT=-2v tar caf foo.tar.xz foo Scripts may use XZ_OPT, for example, to set script-specific default compression options. It is still recommended to allow users to override XZ_OPT if that is reasonable. For example, in sh(1) scripts one may use something like this: XZ_OPT=${XZ_OPT-"-7e"} export XZ_OPT LZMA UTILS COMPATIBILITY The command line syntax of xz is practically a superset of lzma, unlzma, and lzcat as found from LZMA Utils 4.32.x. In most cases, it is possible to replace LZMA Utils with XZ Utils without breaking existing scripts. There are some incompatibilities though, which may sometimes cause problems. Compression preset levels The numbering of the compression level presets is not identical in xz and LZMA Utils. The most important difference is how dictionary sizes are mapped to different presets. Dictionary size is roughly equal to the decompressor memory usage. Level xz LZMA Utils -0 256 KiB N/A -1 1 MiB 64 KiB -2 2 MiB 1 MiB -3 4 MiB 512 KiB -4 4 MiB 1 MiB -5 8 MiB 2 MiB -6 8 MiB 4 MiB -7 16 MiB 8 MiB -8 32 MiB 16 MiB -9 64 MiB 32 MiB The dictionary size differences affect the compressor memory usage too, but there are some other differences between LZMA Utils and XZ Utils, which make the difference even bigger: Level xz LZMA Utils 4.32.x -0 3 MiB N/A -1 9 MiB 2 MiB -2 17 MiB 12 MiB -3 32 MiB 12 MiB -4 48 MiB 16 MiB -5 94 MiB 26 MiB -6 94 MiB 45 MiB -7 186 MiB 83 MiB -8 370 MiB 159 MiB -9 674 MiB 311 MiB The default preset level in LZMA Utils is -7 while in XZ Utils it is -6, so both use an 8 MiB dictionary by default. Streamed vs. non-streamed .lzma files The uncompressed size of the file can be stored in the .lzma header. LZMA Utils does that when compressing regular files. The alternative is to mark that uncompressed size is unknown and use end-of-payload marker to indicate where the decompressor should stop. LZMA Utils uses this method when uncompressed size isn't known, which is the case, for example, in pipes. xz supports decompressing .lzma files with or without end-of-payload marker, but all .lzma files created by xz will use end-of-payload marker and have uncompressed size marked as unknown in the .lzma header. This may be a problem in some uncommon situations. For example, a .lzma decompressor in an embedded device might work only with files that have known uncompressed size. If you hit this problem, you need to use LZMA Utils or LZMA SDK to create .lzma files with known uncompressed size. Unsupported .lzma files The .lzma format allows lc values up to 8, and lp values up to 4. LZMA Utils can decompress files with any lc and lp, but always creates files with lc=3 and lp=0. Creating files with other lc and lp is possible with xz and with LZMA SDK. The implementation of the LZMA1 filter in liblzma requires that the sum of lc and lp must not exceed 4. Thus, .lzma files, which exceed this limitation, cannot be decompressed with xz. LZMA Utils creates only .lzma files which have a dictionary size of 2^n (a power of 2) but accepts files with any dictionary size. liblzma accepts only .lzma files which have a dictionary size of 2^n or 2^n + 2^(n-1). This is to decrease false positives when detecting .lzma files. These limitations shouldn't be a problem in practice, since practically all .lzma files have been compressed with settings that liblzma will accept. Trailing garbage When decompressing, LZMA Utils silently ignore everything after the first .lzma stream. In most situations, this is a bug. This also means that LZMA Utils don't support decompressing concatenated .lzma files. If there is data left after the first .lzma stream, xz considers the file to be corrupt unless --single-stream was used. This may break obscure scripts which have assumed that trailing garbage is ignored. NOTES Compressed output may vary The exact compressed output produced from the same uncompressed input file may vary between XZ Utils versions even if compression options are identical. This is because the encoder can be improved (faster or better compression) without affecting the file format. The output can vary even between different builds of the same XZ Utils version, if different build options are used. The above means that once --rsyncable has been implemented, the resulting files won't necessarily be rsyncable unless both old and new files have been compressed with the same xz version. This problem can be fixed if a part of the encoder implementation is frozen to keep rsyncable output stable across xz versions. Embedded .xz decompressors Embedded .xz decompressor implementations like XZ Embedded don't necessarily support files created with integrity check types other than none and crc32. Since the default is --check=crc64, you must use --check=none or --check=crc32 when creating files for embedded systems. Outside embedded systems, all .xz format decompressors support all the check types, or at least are able to decompress the file without verifying the integrity check if the particular check is not supported. XZ Embedded supports BCJ filters, but only with the default start offset.
|
Basics Compress the file foo into foo.xz using the default compression level (-6), and remove foo if compression is successful: xz foo Decompress bar.xz into bar and don't remove bar.xz even if decompression is successful: xz -dk bar.xz Create baz.tar.xz with the preset -4e (-4 --extreme), which is slower than the default -6, but needs less memory for compression and decompression (48 MiB and 5 MiB, respectively): tar cf - baz | xz -4e > baz.tar.xz A mix of compressed and uncompressed files can be decompressed to standard output with a single command: xz -dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt Parallel compression of many files On GNU and *BSD, find(1) and xargs(1) can be used to parallelize compression of many files: find . -type f \! -name '*.xz' -print0 \ | xargs -0r -P4 -n16 xz -T1 The -P option to xargs(1) sets the number of parallel xz processes. The best value for the -n option depends on how many files there are to be compressed. If there are only a couple of files, the value should probably be 1; with tens of thousands of files, 100 or even more may be appropriate to reduce the number of xz processes that xargs(1) will eventually create. The option -T1 for xz is there to force it to single-threaded mode, because xargs(1) is used to control the amount of parallelization. Robot mode Calculate how many bytes have been saved in total after compressing multiple files: xz --robot --list *.xz | awk '/^totals/{print $5-$4}' A script may want to know that it is using new enough xz. The following sh(1) script checks that the version number of the xz tool is at least 5.0.0. This method is compatible with old beta versions, which didn't support the --robot option: if ! eval "$(xz --robot --version 2> /dev/null)" || [ "$XZ_VERSION" -lt 50000002 ]; then echo "Your xz is too old." fi unset XZ_VERSION LIBLZMA_VERSION Set a memory usage limit for decompression using XZ_OPT, but if a limit has already been set, don't increase it: NEWLIM=$((123 << 20)) # 123 MiB OLDLIM=$(xz --robot --info-memory | cut -f3) if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then XZ_OPT="$XZ_OPT --memlimit-decompress=$NEWLIM" export XZ_OPT fi Custom compressor filter chains The simplest use for custom filter chains is customizing a LZMA2 preset. This can be useful, because the presets cover only a subset of the potentially useful combinations of compression settings. The CompCPU columns of the tables from the descriptions of the options -0 ... -9 and --extreme are useful when customizing LZMA2 presets. Here are the relevant parts collected from those two tables: Preset CompCPU -0 0 -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -5e 7 -6e 8 If you know that a file requires somewhat big dictionary (for example, 32 MiB) to compress well, but you want to compress it quicker than xz -8 would do, a preset with a low CompCPU value (for example, 1) can be modified to use a bigger dictionary: xz --lzma2=preset=1,dict=32MiB foo.tar With certain files, the above command may be faster than xz -6 while compressing significantly better. However, it must be emphasized that only some files benefit from a big dictionary while keeping the CompCPU value low. The most obvious situation, where a big dictionary can help a lot, is an archive containing very similar files of at least a few megabytes each. The dictionary size has to be significantly bigger than any individual file to allow LZMA2 to take full advantage of the similarities between consecutive files. If very high compressor and decompressor memory usage is fine, and the file being compressed is at least several hundred megabytes, it may be useful to use an even bigger dictionary than the 64 MiB that xz -9 would use: xz -vv --lzma2=dict=192MiB big_foo.tar Using -vv (--verbose --verbose) like in the above example can be useful to see the memory requirements of the compressor and decompressor. Remember that using a dictionary bigger than the size of the uncompressed file is waste of memory, so the above command isn't useful for small files. Sometimes the compression time doesn't matter, but the decompressor memory usage has to be kept low, for example, to make it possible to decompress the file on an embedded system. The following command uses -6e (-6 --extreme) as a base and sets the dictionary to only 64 KiB. The resulting file can be decompressed with XZ Embedded (that's why there is --check=crc32) using about 100 KiB of memory. xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo If you want to squeeze out as many bytes as possible, adjusting the number of literal context bits (lc) and number of position bits (pb) can sometimes help. Adjusting the number of literal position bits (lp) might help too, but usually lc and pb are more important. For example, a source code archive contains mostly US-ASCII text, so something like the following might give slightly (like 0.1 %) smaller file than xz -6e (try also without lc=4): xz --lzma2=preset=6e,pb=0,lc=4 source_code.tar Using another filter together with LZMA2 can improve compression with certain file types. For example, to compress a x86-32 or x86-64 shared library using the x86 BCJ filter: xz --x86 --lzma2 libfoo.so Note that the order of the filter options is significant. If --x86 is specified after --lzma2, xz will give an error, because there cannot be any filter after LZMA2, and also because the x86 BCJ filter cannot be used as the last filter in the chain. The Delta filter together with LZMA2 can give good results with bitmap images. It should usually beat PNG, which has a few more advanced filters than simple delta but uses Deflate for the actual compression. The image has to be saved in uncompressed format, for example, as uncompressed TIFF. The distance parameter of the Delta filter is set to match the number of bytes per pixel in the image. For example, 24-bit RGB bitmap needs dist=3, and it is also good to pass pb=0 to LZMA2 to accommodate the three-byte alignment: xz --delta=dist=3 --lzma2=pb=0 foo.tiff If multiple images have been put into a single archive (for example, .tar), the Delta filter will work on that too as long as all images have the same number of bytes per pixel. SEE ALSO xzdec(1), xzdiff(1), xzgrep(1), xzless(1), xzmore(1), gzip(1), bzip2(1), 7z(1) XZ Utils: <https://tukaani.org/xz/> XZ Embedded: <https://tukaani.org/xz/embedded.html> LZMA SDK: <https://7-zip.org/sdk.html> Tukaani 2024-04-08 XZ(1)
|
env_parallel.zsh
| null | null | null | null | null |
myisampack
|
The myisampack utility compresses MyISAM tables. myisampack works by compressing each column in the table separately. Usually, myisampack packs the data file 40% to 70%. When the table is used later, the server reads into memory the information needed to decompress columns. This results in much better performance when accessing individual rows, because you only have to uncompress exactly one row. MySQL uses mmap() when possible to perform memory mapping on compressed tables. If mmap() does not work, MySQL falls back to normal read/write file operations. Please note the following: • If the mysqld server was invoked with external locking disabled, it is not a good idea to invoke myisampack if the table might be updated by the server during the packing process. It is safest to compress tables with the server stopped. • After packing a table, it becomes read only. This is generally intended (such as when accessing packed tables on a CD). • myisampack does not support partitioned tables. Invoke myisampack like this: myisampack [options] file_name ... Each file name argument should be the name of an index (.MYI) file. If you are not in the database directory, you should specify the path name to the file. It is permissible to omit the .MYI extension. After you compress a table with myisampack, use myisamchk -rq to rebuild its indexes. myisamchk(1). myisampack supports the following options. It also reads option files and supports the options for processing them described at Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”. • --help, -? ┌────────────────────┬────────┐ │Command-Line Format │ --help │ └────────────────────┴────────┘ Display a help message and exit. • --backup, -b ┌────────────────────┬──────────┐ │Command-Line Format │ --backup │ └────────────────────┴──────────┘ Make a backup of each table's data file using the name tbl_name.OLD. • --character-sets-dir=dir_name ┌────────────────────┬───────────────────────────────┐ │Command-Line Format │ --character-sets-dir=dir_name │ ├────────────────────┼───────────────────────────────┤ │Type │ Directory name │ └────────────────────┴───────────────────────────────┘ The directory where character sets are installed. See Section 10.15, “Character Set Configuration”. • --debug[=debug_options], -# [debug_options] ┌────────────────────┬─────────────────────────┐ │Command-Line Format │ --debug[=debug_options] │ ├────────────────────┼─────────────────────────┤ │Type │ String │ ├────────────────────┼─────────────────────────┤ │Default Value │ d:t:o │ └────────────────────┴─────────────────────────┘ Write a debugging log. A typical debug_options string is d:t:o,file_name. The default is d:t:o. This option is available only if MySQL was built using WITH_DEBUG. MySQL release binaries provided by Oracle are not built using this option. • --force, -f ┌────────────────────┬─────────┐ │Command-Line Format │ --force │ └────────────────────┴─────────┘ Produce a packed table even if it becomes larger than the original or if the intermediate file from an earlier invocation of myisampack exists. (myisampack creates an intermediate file named tbl_name.TMD in the database directory while it compresses the table. If you kill myisampack, the .TMD file might not be deleted.) Normally, myisampack exits with an error if it finds that tbl_name.TMD exists. With --force, myisampack packs the table anyway. • --join=big_tbl_name, -j big_tbl_name ┌────────────────────┬─────────────────────┐ │Command-Line Format │ --join=big_tbl_name │ ├────────────────────┼─────────────────────┤ │Type │ String │ └────────────────────┴─────────────────────┘ Join all tables named on the command line into a single packed table big_tbl_name. All tables that are to be combined must have identical structure (same column names and types, same indexes, and so forth). big_tbl_name must not exist prior to the join operation. All source tables named on the command line to be merged into big_tbl_name must exist. The source tables are read for the join operation but not modified. • --silent, -s ┌────────────────────┬──────────┐ │Command-Line Format │ --silent │ └────────────────────┴──────────┘ Silent mode. Write output only when errors occur. • --test, -t ┌────────────────────┬────────┐ │Command-Line Format │ --test │ └────────────────────┴────────┘ Do not actually pack the table, just test packing it. • --tmpdir=dir_name, -T dir_name ┌────────────────────┬───────────────────┐ │Command-Line Format │ --tmpdir=dir_name │ ├────────────────────┼───────────────────┤ │Type │ Directory name │ └────────────────────┴───────────────────┘ Use the named directory as the location where myisampack creates temporary files. • --verbose, -v ┌────────────────────┬───────────┐ │Command-Line Format │ --verbose │ └────────────────────┴───────────┘ Verbose mode. Write information about the progress of the packing operation and its result. • --version, -V ┌────────────────────┬───────────┐ │Command-Line Format │ --version │ └────────────────────┴───────────┘ Display version information and exit. • --wait, -w ┌────────────────────┬────────┐ │Command-Line Format │ --wait │ └────────────────────┴────────┘ Wait and retry if the table is in use. If the mysqld server was invoked with external locking disabled, it is not a good idea to invoke myisampack if the table might be updated by the server during the packing process. The following sequence of commands illustrates a typical table compression session: $> ls -l station.* -rw-rw-r-- 1 jones my 994128 Apr 17 19:00 station.MYD -rw-rw-r-- 1 jones my 53248 Apr 17 19:00 station.MYI $> myisamchk -dvv station MyISAM file: station Isam-version: 2 Creation time: 1996-03-13 10:08:58 Recover time: 1997-02-02 3:06:43 Data records: 1192 Deleted blocks: 0 Datafile parts: 1192 Deleted data: 0 Datafile pointer (bytes): 2 Keyfile pointer (bytes): 2 Max datafile length: 54657023 Max keyfile length: 33554431 Recordlength: 834 Record format: Fixed length table description: Key Start Len Index Type Root Blocksize Rec/key 1 2 4 unique unsigned long 1024 1024 1 2 32 30 multip. text 10240 1024 1 Field Start Length Type 1 1 1 2 2 4 3 6 4 4 10 1 5 11 20 6 31 1 7 32 30 8 62 35 9 97 35 10 132 35 11 167 4 12 171 16 13 187 35 14 222 4 15 226 16 16 242 20 17 262 20 18 282 20 19 302 30 20 332 4 21 336 4 22 340 1 23 341 8 24 349 8 25 357 8 26 365 2 27 367 2 28 369 4 29 373 4 30 377 1 31 378 2 32 380 8 33 388 4 34 392 4 35 396 4 36 400 4 37 404 1 38 405 4 39 409 4 40 413 4 41 417 4 42 421 4 43 425 4 44 429 20 45 449 30 46 479 1 47 480 1 48 481 79 49 560 79 50 639 79 51 718 79 52 797 8 53 805 1 54 806 1 55 807 20 56 827 4 57 831 4 $> myisampack station.MYI Compressing station.MYI: (1192 records) - Calculating statistics normal: 20 empty-space: 16 empty-zero: 12 empty-fill: 11 pre-space: 0 end-space: 12 table-lookups: 5 zero: 7 Original trees: 57 After join: 17 - Compressing file 87.14% Remember to run myisamchk -rq on compressed tables $> myisamchk -rq station - check record delete-chain - recovering (with sort) MyISAM-table 'station' Data records: 1192 - Fixing index 1 - Fixing index 2 $> mysqladmin -uroot flush-tables $> ls -l station.* -rw-rw-r-- 1 jones my 127874 Apr 17 19:00 station.MYD -rw-rw-r-- 1 jones my 55296 Apr 17 19:04 station.MYI $> myisamchk -dvv station MyISAM file: station Isam-version: 2 Creation time: 1996-03-13 10:08:58 Recover time: 1997-04-17 19:04:26 Data records: 1192 Deleted blocks: 0 Datafile parts: 1192 Deleted data: 0 Datafile pointer (bytes): 3 Keyfile pointer (bytes): 1 Max datafile length: 16777215 Max keyfile length: 131071 Recordlength: 834 Record format: Compressed table description: Key Start Len Index Type Root Blocksize Rec/key 1 2 4 unique unsigned long 10240 1024 1 2 32 30 multip. text 54272 1024 1 Field Start Length Type Huff tree Bits 1 1 1 constant 1 0 2 2 4 zerofill(1) 2 9 3 6 4 no zeros, zerofill(1) 2 9 4 10 1 3 9 5 11 20 table-lookup 4 0 6 31 1 3 9 7 32 30 no endspace, not_always 5 9 8 62 35 no endspace, not_always, no empty 6 9 9 97 35 no empty 7 9 10 132 35 no endspace, not_always, no empty 6 9 11 167 4 zerofill(1) 2 9 12 171 16 no endspace, not_always, no empty 5 9 13 187 35 no endspace, not_always, no empty 6 9 14 222 4 zerofill(1) 2 9 15 226 16 no endspace, not_always, no empty 5 9 16 242 20 no endspace, not_always 8 9 17 262 20 no endspace, no empty 8 9 18 282 20 no endspace, no empty 5 9 19 302 30 no endspace, no empty 6 9 20 332 4 always zero 2 9 21 336 4 always zero 2 9 22 340 1 3 9 23 341 8 table-lookup 9 0 24 349 8 table-lookup 10 0 25 357 8 always zero 2 9 26 365 2 2 9 27 367 2 no zeros, zerofill(1) 2 9 28 369 4 no zeros, zerofill(1) 2 9 29 373 4 table-lookup 11 0 30 377 1 3 9 31 378 2 no zeros, zerofill(1) 2 9 32 380 8 no zeros 2 9 33 388 4 always zero 2 9 34 392 4 table-lookup 12 0 35 396 4 no zeros, zerofill(1) 13 9 36 400 4 no zeros, zerofill(1) 2 9 37 404 1 2 9 38 405 4 no zeros 2 9 39 409 4 always zero 2 9 40 413 4 no zeros 2 9 41 417 4 always zero 2 9 42 421 4 no zeros 2 9 43 425 4 always zero 2 9 44 429 20 no empty 3 9 45 449 30 no empty 3 9 46 479 1 14 4 47 480 1 14 4 48 481 79 no endspace, no empty 15 9 49 560 79 no empty 2 9 50 639 79 no empty 2 9 51 718 79 no endspace 16 9 52 797 8 no empty 2 9 53 805 1 17 1 54 806 1 3 9 55 807 20 no empty 3 9 56 827 4 no zeros, zerofill(2) 2 9 57 831 4 no zeros, zerofill(1) 2 9 myisampack displays the following kinds of information: • normal The number of columns for which no extra packing is used. • empty-space The number of columns containing values that are only spaces. These occupy one bit. • empty-zero The number of columns containing values that are only binary zeros. These occupy one bit. • empty-fill The number of integer columns that do not occupy the full byte range of their type. These are changed to a smaller type. For example, a BIGINT column (eight bytes) can be stored as a TINYINT column (one byte) if all its values are in the range from -128 to 127. • pre-space The number of decimal columns that are stored with leading spaces. In this case, each value contains a count for the number of leading spaces. • end-space The number of columns that have a lot of trailing spaces. In this case, each value contains a count for the number of trailing spaces. • table-lookup The column had only a small number of different values, which were converted to an ENUM before Huffman compression. • zero The number of columns for which all values are zero. • Original trees The initial number of Huffman trees. • After join The number of distinct Huffman trees left after joining trees to save some header space. After a table has been compressed, the Field lines displayed by myisamchk -dvv include additional information about each column: • Type The data type. The value may contain any of the following descriptors: • constant All rows have the same value. • no endspace Do not store endspace. • no endspace, not_always Do not store endspace and do not do endspace compression for all values. • no endspace, no empty Do not store endspace. Do not store empty values. • table-lookup The column was converted to an ENUM. • zerofill(N) The most significant N bytes in the value are always 0 and are not stored. • no zeros Do not store zeros. • always zero Zero values are stored using one bit. • Huff tree The number of the Huffman tree associated with the column. • Bits The number of bits used in the Huffman tree. After you run myisampack, use myisamchk to re-create any indexes. At this time, you can also sort the index blocks and create statistics needed for the MySQL optimizer to work more efficiently: myisamchk -rq --sort-index --analyze tbl_name.MYI After you have installed the packed table into the MySQL database directory, you should execute mysqladmin flush-tables to force mysqld to start using the new table. To unpack a packed table, use the --unpack option to myisamchk. COPYRIGHT Copyright © 1997, 2023, Oracle and/or its affiliates. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. SEE ALSO For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. AUTHOR Oracle Corporation (http://dev.mysql.com/). MySQL 8.3 11/23/2023 MYISAMPACK(1)
|
myisampack - generate compressed, read-only MyISAM tables
|
myisampack [options] file_name ...
| null | null |
generic_sum
| null | null | null | null | null |
metaflac
|
Use metaflac to list, add, remove, or edit metadata in one or more FLAC files. You may perform one major operation, or many shorthand operations at a time. GENERAL USAGE metaflac is the command-line .flac file metadata editor. You can use it to list the contents of metadata blocks, edit, delete or insert blocks, and manage padding. metaflac takes a set of “options” (though some are not optional) and a set of FLAC files to operate on. There are three kinds of “options”: • Major operations, which specify a mode of operation like listing blocks, removing blocks, etc. These will have sub-operations describing exactly what is to be done. • Shorthand operations, which are convenient synonyms for major operations. For example, there is a shorthand operation –show- sample-rate that shows just the sample rate field from the STREAMINFO metadata block. • Global options, which affect all the operations. All of these are described in the tables below. At least one shorthand or major operation must be supplied. You can use multiple shorthand operations to do more than one thing to a file or set of files. Most of the common things to do to metadata have shorthand operations. As an example, here is how to show the MD5 signatures for a set of three FLAC files: metaflac --show-md5sum file1.flac file2.flac file3.flac Another example; this removes all DESCRIPTION and COMMENT tags in a set of FLAC files, and uses the –preserve-modtime global option to keep the FLAC file modification times the same (usually when files are edited the modification time is set to the current time): metaflac --preserve-modtime --remove-tag=DESCRIPTION --remove-tag=COMMENT file1.flac file2.flac file3.flac
|
metaflac - program to list, add, remove, or edit metadata in one or more FLAC files.
|
metaflac [ options ] [ operations ] FLACfile ...
|
--preserve-modtime Preserve the original modification time in spite of edits. --with-filename Prefix each output line with the FLAC file name (the default if more than one FLAC file is specified). This option has no effect for options exporting to a file, like –export-tags-to. --no-filename Do not prefix each output line with the FLAC file name (the default if only one FLAC file is specified). --no-utf8-convert Do not convert tags from UTF-8 to local charset, or vice versa. This is useful for scripts, and setting tags in situations where the locale is wrong. --dont-use-padding By default metaflac tries to use padding where possible to avoid rewriting the entire file if the metadata size changes. Use this option to tell metaflac to not take advantage of padding this way. SHORTHAND OPERATIONS --show-md5sum Show the MD5 signature from the STREAMINFO block. --show-min-blocksize Show the minimum block size from the STREAMINFO block. --show-max-blocksize Show the maximum block size from the STREAMINFO block. --show-min-framesize Show the minimum frame size from the STREAMINFO block. --show-max-framesize Show the maximum frame size from the STREAMINFO block. --show-sample-rate Show the sample rate from the STREAMINFO block. --show-channels Show the number of channels from the STREAMINFO block. --show-bps Show the # of bits per sample from the STREAMINFO block. --show-total-samples Show the total # of samples from the STREAMINFO block. --show-vendor-tag Show the vendor string from the VORBIS_COMMENT block. --show-tag=name Show all tags where the field name matches `name'. --show-all-tags Show all tags. This is an alias for –export-tags-to=-. --remove-tag=name Remove all tags whose field name is `name'. --remove-first-tag=name Remove first tag whose field name is `name'. --remove-all-tags Remove all tags, leaving only the vendor string. --remove-all-tags-except=NAME1[=NAME2[=...]] Remove all tags, except the vendor string and the tag names specified. Tag names must be separated by an = character. --set-tag=field Add a tag. The field must comply with the Vorbis comment spec, of the form “NAME=VALUE”. If there is currently no tag block, one will be created. --set-tag-from-file=field Like --set-tag, except the VALUE is a filename whose contents will be read verbatim to set the tag value. Unless --no- utf8-convert is specified, the contents will be converted to UTF-8 from the local charset. This can be used to store a cuesheet in a tag (e.g. --set-tag-from- file=“CUESHEET=image.cue”). Do not try to store binary data in tag fields! Use APPLICATION blocks for that. --import-tags-from=file Import tags from a file. Use `-' for stdin. Each line should be of the form NAME=VALUE. Multi-line comments are currently not supported. Specify --remove-all-tags and/or --no- utf8-convert before --import-tags-from if necessary. If FILE is `-' (stdin), only one FLAC file may be specified. --export-tags-to=file Export tags to a file. Use `-' for stdout. Each line will be of the form NAME=VALUE. Specify --no-utf8-convert if necessary. --import-cuesheet-from=file Import a cuesheet from a file. Use `-' for stdin. Only one FLAC file may be specified. A seekpoint will be added for each index point in the cuesheet to the SEEKTABLE unless --no-cued- seekpoints is specified. --export-cuesheet-to=file Export CUESHEET block to a cuesheet file, suitable for use by CD authoring software. Use `-' for stdout. Only one FLAC file may be specified on the command line. --import-picture-from={FILENAME|SPECIFICATION} Import a picture and store it in a PICTURE metadata block. More than one --import-picture-from command can be specified. Either a filename for the picture file or a more complete specification form can be used. The SPECIFICATION is a string whose parts are separated by | (pipe) characters. Some parts may be left empty to invoke default values. FILENAME is just shorthand for “||||FILENAME”. For details on the specification, see the section Picture specification in the flac(1) man page. --export-picture-to=file Export PICTURE block to a file. Use `-' for stdout. Only one FLAC file may be specified on the command line. The first PICTURE block will be exported unless --export-picture-to is preceded by a --block-number=# option to specify the exact metadata block to extract. Note that the block number is the one shown by --list. --add-replay-gain Calculates the title and album gains/peaks of the given FLAC files as if all the files were part of one album, then stores them as FLAC tags. The tags are the same as those used by vorbisgain. Existing ReplayGain tags will be replaced. If only one FLAC file is given, the album and title gains will be the same. Since this operation requires two passes, it is always executed last, after all other operations have been completed and written to disk. All FLAC files specified must have the same resolution, sample rate, and number of channels. Only mono and stereo files are allowed, and the sample rate must be 8, 11.025, 12, 16, 18.9, 22.05, 24, 28, 32, 36, 37.8, 44.1, 48, 56, 64, 72, 75.6, 88.2, 96, 112, 128, 144, 151.2, 176.4, 192, 224, 256, 288, 302.4, 352.8, 384, 448, 512, 576, or 604.8 kHz. --scan-replay-gain Like --add-replay-gain, but only analyzes the files rather than writing them to the tags. --remove-replay-gain Removes the ReplayGain tags. --add-seekpoint={#|X|#x|#s} Add seek points to a SEEKTABLE block. Using #, a seek point at that sample number is added. Using X, a placeholder point is added at the end of a the table. Using #x, # evenly spaced seek points will be added, the first being at sample 0. Using #s, a seekpoint will be added every # seconds (# does not have to be a whole number; it can be, for example, 9.5, meaning a seekpoint every 9.5 seconds). If no SEEKTABLE block exists, one will be created. If one already exists, points will be added to the existing table, and any duplicates will be turned into placeholder points. You may use many --add-seekpoint options; the resulting SEEKTABLE will be the unique-ified union of all such values. Example: --add-seekpoint=100x --add-seekpoint=3.5s will add 100 evenly spaced seekpoints and a seekpoint every 3.5 seconds. --add-padding=length Add a padding block of the given length (in bytes). The overall length of the new block will be 4 + length; the extra 4 bytes is for the metadata block header. MAJOR OPERATIONS --list List the contents of one or more metadata blocks to stdout. By default, all metadata blocks are listed in text format. Use the options --block-number, --block-type or --except-block-type to change this behavior. --remove Remove one or more metadata blocks from the metadata. Use the options --block-number, --block-type or --except-block-type to specify which blocks should be removed. Note that if both --block-number and --[except-]block-type are specified, the result is the logical AND of both arguments. Unless --dont-use- padding is specified, the blocks will be replaced with padding. You may not remove the STREAMINFO block. --block-number=#[,#[...]] An optional comma-separated list of block numbers to display. The first block, the STREAMINFO block, is block 0. --block-type=type[,type[...]] --except-block-type=type[,type[...]] An optional comma-separated list of block types to be included or ignored with this option. Use only one of --block-type or --except-block-type. The valid block types are: STREAMINFO, PADDING, APPLICATION, SEEKTABLE, VORBIS_COMMENT, PICTURE. You may narrow down the types of APPLICATION blocks selected by appending APPLICATION with a colon and the ID of the APPLICATION block in either ASCII or hexadecimal representation. E.g. APPLICATION:abcd for the APPLICATION block(s) whose textual representation of the 4-byte ID is “abcd” or APPLICATION:0xXXXXXXXX for the APPLICATION block(s) whose hexadecimal big- endian representation of the 4-byte ID is “0xXXXXXXXX”. For the example “abcd” above the hexadecimal equivalalent is 0x61626364 --application-data-format=hexdump|text If the application block you are displaying contains binary data but your --data-format=text, you can display a hex dump of the application data contents instead using --application-data- format=hexdump. --data-format=binary|binary-headerless|text For use with –list. By default a human-readable text representation of the data is isplayed. You may specify –data- format=binary to dump the raw binary form of each metadata block. Specify –data-format=binary-headerless to omit output of metadata block headers, including the id of APPLICATION metadata blocks. --append Insert a metadata block from a file. This must be a binary block as exported with –list –data-format=binary. The insertion point is defined with –block-number=#. The new block will be added after the given block number. This prevents the illegal insertion of a block before the first STREAMINFO block. You may not –append another STREAMINFO block. It is possible to copy a metadata block from one file to another with this option. For example use metaflac --list --data-format=binary --block-number=6 file.flac > block to export the block, and then import it with metaflac --append anotherfile.flac < block --remove-all Remove all metadata blocks (except the STREAMINFO block) from the metadata. Unless --dont-use-padding is specified, the blocks will be replaced with padding. --merge-padding Merge adjacent PADDING blocks into single blocks. --sort-padding Move all PADDING blocks to the end of the metadata and merge them into a single block. SEE ALSO flac(1) Version 1.4.3 metaflac(1)
| null |
codecarbon
| null | null | null | null | null |
g[
| null | null | null | null | null |
unrar
| null | null | null | null | null |
gwhoami
|
Print the user name associated with the current effective user ID. Same as id -un. --help display this help and exit --version output version information and exit AUTHOR Written by Richard Mlynarik. REPORTING BUGS GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Report any translation bugs to <https://translationproject.org/team/> COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO Full documentation <https://www.gnu.org/software/coreutils/whoami> or available locally via: info '(coreutils) whoami invocation' GNU coreutils 9.3 April 2023 WHOAMI(1)
|
whoami - print effective user name
|
whoami [OPTION]...
| null | null |
autoreconf
|
Run 'autoconf' and, when needed, 'aclocal', 'autoheader', 'automake', 'autopoint' (formerly 'gettextize'), 'glibtoolize', 'intltoolize', and 'gtkdocize' to regenerate the GNU Build System files in specified DIRECTORIES and their subdirectories (defaulting to '.'). By default, it only remakes those files that are older than their sources. If you install new versions of the GNU Build System, you can make 'autoreconf' remake all of the files by giving it the '--force' option. Operation modes: -h, --help print this help, then exit -V, --version print version number, then exit -v, --verbose verbosely report processing -d, --debug don't remove temporary files -f, --force consider all generated and standard files obsolete -i, --install copy missing standard auxiliary files --no-recursive don't rebuild sub-packages -s, --symlink with -i, install symbolic links instead of copies -m, --make when applicable, re-run ./configure && make -W, --warnings=CATEGORY report the warnings falling in CATEGORY (comma-separated list accepted) Warning categories are: cross cross compilation issues gnu GNU coding standards (default in gnu and gnits modes) obsolete obsolete features or constructions (default) override user redefinitions of Automake rules or variables portability portability issues (default in gnu and gnits modes) portability-recursive nested Make variables (default with -Wportability) extra-portability extra portability issues related to obscure tools syntax dubious syntactic constructs (default) unsupported unsupported or incomplete features (default) -W also understands: all turn on all the warnings none turn off all the warnings no-CATEGORY turn off warnings in CATEGORY error treat all enabled warnings as errors Library directories: -B, --prepend-include=DIR prepend directory DIR to search path -I, --include=DIR append directory DIR to search path The environment variables AUTOCONF, ACLOCAL, AUTOHEADER, AUTOM4TE, AUTOMAKE, AUTOPOINT, GTKDOCIZE, INTLTOOLIZE, LIBTOOLIZE, M4, MAKE, and WARNINGS are honored. AUTHOR Written by David J. MacKenzie and Akim Demaille. REPORTING BUGS Report bugs to <bug-autoconf@gnu.org>, or via Savannah: <https://savannah.gnu.org/support/?group=autoconf>. COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+/Autoconf: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>, <https://gnu.org/licenses/exceptions.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO autoconf(1), automake(1), autoreconf(1), autoupdate(1), autoheader(1), autoscan(1), config.guess(1), config.sub(1), ifnames(1), libtool(1). The full documentation for Autoconf is maintained as a Texinfo manual. To read the manual locally, use the command info autoconf You can also consult the Web version of the manual at <https://gnu.org/software/autoconf/manual/>. GNU Autoconf 2.72 December 2023 AUTORECONF(1)
|
autoreconf - Update generated configuration files
|
autoreconf [OPTION]... [DIRECTORY]...
| null | null |
gsplit
|
Output pieces of FILE to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is 'x'. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -a, --suffix-length=N generate suffixes of length N (default 2) --additional-suffix=SUFFIX append an additional SUFFIX to file names -b, --bytes=SIZE put SIZE bytes per output file -C, --line-bytes=SIZE put at most SIZE bytes of records per output file -d use numeric suffixes starting at 0, not alphabetic --numeric-suffixes[=FROM] same as -d, but allow setting the start value -x use hex suffixes starting at 0, not alphabetic --hex-suffixes[=FROM] same as -x, but allow setting the start value -e, --elide-empty-files do not generate empty output files with '-n' --filter=COMMAND write to shell COMMAND; file name is $FILE -l, --lines=NUMBER put NUMBER lines/records per output file -n, --number=CHUNKS generate CHUNKS output files; see explanation below -t, --separator=SEP use SEP instead of newline as the record separator; '\0' (zero) specifies the NUL character -u, --unbuffered immediately copy input to output with '-n r/...' --verbose print a diagnostic just before each output file is opened --help display this help and exit --version output version information and exit The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y,R,Q (powers of 1024) or KB,MB,... (powers of 1000). Binary prefixes can be used, too: KiB=K, MiB=M, and so on. CHUNKS may be: N split into N files based on size of input K/N output Kth of N to stdout l/N split into N files without splitting lines/records l/K/N output Kth of N to stdout without splitting lines/records r/N like 'l' but use round robin distribution r/K/N likewise but only output Kth of N to stdout AUTHOR Written by Torbjorn Granlund and Richard M. Stallman. REPORTING BUGS GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Report any translation bugs to <https://translationproject.org/team/> COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO Full documentation <https://www.gnu.org/software/coreutils/split> or available locally via: info '(coreutils) split invocation' GNU coreutils 9.3 April 2023 SPLIT(1)
|
split - split a file into pieces
|
split [OPTION]... [FILE [PREFIX]]
| null | null |
carbonboard
| null | null | null | null | null |
signver
| null | null | null | null | null |
dav1d
| null | null | null | null | null |
gseq
|
Print numbers from FIRST to LAST, in steps of INCREMENT. Mandatory arguments to long options are mandatory for short options too. -f, --format=FORMAT use printf style floating-point FORMAT -s, --separator=STRING use STRING to separate numbers (default: \n) -w, --equal-width equalize width by padding with leading zeroes --help display this help and exit --version output version information and exit If FIRST or INCREMENT is omitted, it defaults to 1. That is, an omitted INCREMENT defaults to 1 even when LAST is smaller than FIRST. The sequence of numbers ends when the sum of the current number and INCREMENT would become greater than LAST. FIRST, INCREMENT, and LAST are interpreted as floating point values. INCREMENT is usually positive if FIRST is smaller than LAST, and INCREMENT is usually negative if FIRST is greater than LAST. INCREMENT must not be 0; none of FIRST, INCREMENT and LAST may be NaN. FORMAT must be suitable for printing one argument of type 'double'; it defaults to %.PRECf if FIRST, INCREMENT, and LAST are all fixed point decimal numbers with maximum precision PREC, and to %g otherwise. AUTHOR Written by Ulrich Drepper. REPORTING BUGS GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Report any translation bugs to <https://translationproject.org/team/> COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO Full documentation <https://www.gnu.org/software/coreutils/seq> or available locally via: info '(coreutils) seq invocation' GNU coreutils 9.3 April 2023 SEQ(1)
|
seq - print a sequence of numbers
|
seq [OPTION]... LAST seq [OPTION]... FIRST LAST seq [OPTION]... FIRST INCREMENT LAST
| null | null |
gpg-agent
|
gpg-agent is a daemon to manage secret (private) keys independently from any protocol. It is used as a backend for gpg and gpgsm as well as for a couple of other utilities. The agent is automatically started on demand by gpg, gpgsm, gpgconf, or gpg-connect-agent. Thus there is no reason to start it manually. In case you want to use the included Secure Shell Agent you may start the agent using: gpg-connect-agent /bye If you want to manually terminate the currently-running agent, you can safely do so with: gpgconf --kill gpg-agent You should always add the following lines to your .bashrc or whatever initialization file is used for all shell invocations: GPG_TTY=$(tty) export GPG_TTY It is important that this environment variable always reflects the output of the tty command. For W32 systems this option is not required. Please make sure that a proper pinentry program has been installed under the default filename (which is system dependent) or use the option pinentry-program to specify the full name of that program. It is often useful to install a symbolic link from the actual used pinentry (e.g. ‘/opt/homebrew/Cellar/gnupg/2.4.5/bin/pinentry-gtk’) to the expected one (e.g. ‘/opt/homebrew/Cellar/gnupg/2.4.5/bin/pinentry’). COMMANDS Commands are not distinguished from options except for the fact that only one command is allowed. --version Print the program version and licensing information. Note that you cannot abbreviate this command. --help -h Print a usage message summarizing the most useful command-line options. Note that you cannot abbreviate this command. --dump-options Print a list of all available options and commands. Note that you cannot abbreviate this command. --server Run in server mode and wait for commands on the stdin. The default mode is to create a socket and listen for commands there. --daemon [command line] Start the gpg-agent as a daemon; that is, detach it from the console and run it in the background. As an alternative you may create a new process as a child of gpg-agent: gpg-agent --daemon /bin/sh. This way you get a new shell with the environment setup properly; after you exit from this shell, gpg-agent terminates within a few seconds. --supervised Run in the foreground, sending logs by default to stderr, and listening on provided file descriptors, which must already be bound to listening sockets. This option is deprecated and not supported on Windows. If in ‘common.conf’ the option no-autostart is set, any start attempts will be ignored. In --supervised mode, different file descriptors can be provided for use as different socket types (e.g. ssh, extra) as long as they are identified in the environment variable LISTEN_FDNAMES (see sd_listen_fds(3) on some Linux distributions for more information on this convention).
|
gpg-agent - Secret key management for GnuPG
|
gpg-agent [--homedir dir] [--options file] [options] gpg-agent [--homedir dir] [--options file] [options] --server gpg-agent [--homedir dir] [--options file] [options] --daemon [command_line]
|
Options may either be used on the command line or, after stripping off the two leading dashes, in the configuration file. --options file Reads configuration from file instead of from the default per- user configuration file. The default configuration file is named ‘gpg-agent.conf’ and expected in the ‘.gnupg’ directory directly below the home directory of the user. This option is ignored if used in an options file. --homedir dir Set the name of the home directory to dir. If this option is not used, the home directory defaults to ‘~/.gnupg’. It is only recognized when given on the command line. It also overrides any home directory stated through the environment variable ‘GNUPGHOME’ or (on Windows systems) by means of the Registry entry HKCU\Software\GNU\GnuPG:HomeDir. On Windows systems it is possible to install GnuPG as a portable application. In this case only this command line option is considered, all other ways to set a home directory are ignored. -v --verbose Outputs additional information while running. You can increase the verbosity by giving several verbose commands to gpg-agent, such as ‘-vv’. -q --quiet Try to be as quiet as possible. --batch Don't invoke a pinentry or do any other thing requiring human interaction. --faked-system-time epoch This option is only useful for testing; it sets the system time back or forth to epoch which is the number of seconds elapsed since the year 1970. --debug-level level Select the debug level for investigating problems. level may be a numeric value or a keyword: none No debugging at all. A value of less than 1 may be used instead of the keyword. basic Some basic debug messages. A value between 1 and 2 may be used instead of the keyword. advanced More verbose debug messages. A value between 3 and 5 may be used instead of the keyword. expert Even more detailed messages. A value between 6 and 8 may be used instead of the keyword. guru All of the debug messages you can get. A value greater than 8 may be used instead of the keyword. The creation of hash tracing files is only enabled if the keyword is used. How these messages are mapped to the actual debugging flags is not specified and may change with newer releases of this program. They are however carefully selected to best aid in debugging. --debug flags Set debug flags. All flags are or-ed and flags may be given in C syntax (e.g. 0x0042) or as a comma separated list of flag names. To get a list of all supported flags the single word "help" can be used. This option is only useful for debugging and the behavior may change at any time without notice. --debug-all Same as --debug=0xffffffff --debug-wait n When running in server mode, wait n seconds before entering the actual processing loop and print the pid. This gives time to attach a debugger. --debug-quick-random This option inhibits the use of the very secure random quality level (Libgcrypt’s GCRY_VERY_STRONG_RANDOM) and degrades all request down to standard random quality. It is only used for testing and should not be used for any production quality keys. This option is only effective when given on the command line. On GNU/Linux, another way to quickly generate insecure keys is to use rngd to fill the kernel's entropy pool with lower quality random data. rngd is typically provided by the rng-tools package. It can be run as follows: ‘sudo rngd -f -r /dev/urandom’. --debug-pinentry This option enables extra debug information pertaining to the Pinentry. As of now it is only useful when used along with --debug 1024. --no-detach Don't detach the process from the console. This is mainly useful for debugging. --steal-socket In --daemon mode, gpg-agent detects an already running gpg-agent and does not allow one to start a new instance. This option can be used to override this check: the new gpg-agent process will try to take over the communication sockets from the already running process and start anyway. This option should in general not be used. -s --sh -c --csh Format the info output in daemon mode for use with the standard Bourne shell or the C-shell respectively. The default is to guess it based on the environment variable SHELL which is correct in almost all cases. --grab --no-grab Tell the pinentry to grab the keyboard and mouse. This option should be used on X-Servers to avoid X-sniffing attacks. Any use of the option --grab overrides an used option --no-grab. The default is --no-grab. --log-file file Append all logging output to file. This is very helpful in seeing what the agent actually does. Use ‘socket://’ to log to socket. If neither a log file nor a log file descriptor has been set on a Windows platform, the Registry entry HKCU\Software\GNU\GnuPG:DefaultLogFile, if set, is used to specify the logging output. --no-allow-mark-trusted Do not allow clients to mark keys as trusted, i.e. put them into the ‘trustlist.txt’ file. This makes it harder for users to inadvertently accept Root-CA keys. --no-user-trustlist Entirely ignore the user trust list and consider only the global trustlist (‘/opt/homebrew/etc/gnupg/trustlist.txt’). This implies the [option --no-allow-mark-trusted]. --sys-trustlist-name file Changes the default name for the global trustlist from "trustlist.txt" to file. If file does not contain any slashes and does not start with "~/" it is searched in the system configuration directory (‘/opt/homebrew/etc/gnupg’). --allow-preset-passphrase This option allows the use of gpg-preset-passphrase to seed the internal cache of gpg-agent with passphrases. --no-allow-loopback-pinentry --allow-loopback-pinentry Disallow or allow clients to use the loopback pinentry features; see the option pinentry-mode for details. Allow is the default. The --force option of the Assuan command DELETE_KEY is also controlled by this option: The option is ignored if a loopback pinentry is disallowed. --no-allow-external-cache Tell Pinentry not to enable features which use an external cache for passphrases. Some desktop environments prefer to unlock all credentials with one master password and may have installed a Pinentry which employs an additional external cache to implement such a policy. By using this option the Pinentry is advised not to make use of such a cache and instead always ask the user for the requested passphrase. --allow-emacs-pinentry Tell Pinentry to allow features to divert the passphrase entry to a running Emacs instance. How this is exactly handled depends on the version of the used Pinentry. --ignore-cache-for-signing This option will let gpg-agent bypass the passphrase cache for all signing operation. Note that there is also a per-session option to control this behavior but this command line option takes precedence. --default-cache-ttl n Set the time a cache entry is valid to n seconds. The default is 600 seconds. Each time a cache entry is accessed, the entry's timer is reset. To set an entry's maximum lifetime, use max-cache-ttl. Note that a cached passphrase may not be evicted immediately from memory if no client requests a cache operation. This is due to an internal housekeeping function which is only run every few seconds. --default-cache-ttl-ssh n Set the time a cache entry used for SSH keys is valid to n seconds. The default is 1800 seconds. Each time a cache entry is accessed, the entry's timer is reset. To set an entry's maximum lifetime, use max-cache-ttl-ssh. --max-cache-ttl n Set the maximum time a cache entry is valid to n seconds. After this time a cache entry will be expired even if it has been accessed recently or has been set using gpg-preset-passphrase. The default is 2 hours (7200 seconds). --max-cache-ttl-ssh n Set the maximum time a cache entry used for SSH keys is valid to n seconds. After this time a cache entry will be expired even if it has been accessed recently or has been set using gpg-preset-passphrase. The default is 2 hours (7200 seconds). --enforce-passphrase-constraints Enforce the passphrase constraints by not allowing the user to bypass them using the ``Take it anyway'' button. --min-passphrase-len n Set the minimal length of a passphrase. When entering a new passphrase shorter than this value a warning will be displayed. Defaults to 8. --min-passphrase-nonalpha n Set the minimal number of digits or special characters required in a passphrase. When entering a new passphrase with less than this number of digits or special characters a warning will be displayed. Defaults to 1. --check-passphrase-pattern file --check-sym-passphrase-pattern file Check the passphrase against the pattern given in file. When entering a new passphrase matching one of these pattern a warning will be displayed. If file does not contain any slashes and does not start with "~/" it is searched in the system configuration directory (‘/opt/homebrew/etc/gnupg’). The default is not to use any pattern file. The second version of this option is only used when creating a new symmetric key to allow the use of different patterns for such passphrases. Security note: It is known that checking a passphrase against a list of pattern or even against a complete dictionary is not very effective to enforce good passphrases. Users will soon figure up ways to bypass such a policy. A better policy is to educate users on good security behavior and optionally to run a passphrase cracker regularly on all users passphrases to catch the very simple ones. --max-passphrase-days n Ask the user to change the passphrase if n days have passed since the last change. With --enforce-passphrase-constraints set the user may not bypass this check. --enable-passphrase-history This option does nothing yet. --pinentry-invisible-char char This option asks the Pinentry to use char for displaying hidden characters. char must be one character UTF-8 string. A Pinentry may or may not honor this request. --pinentry-timeout n This option asks the Pinentry to timeout after n seconds with no user input. The default value of 0 does not ask the pinentry to timeout, however a Pinentry may use its own default timeout value in this case. A Pinentry may or may not honor this request. --pinentry-formatted-passphrase This option asks the Pinentry to enable passphrase formatting when asking the user for a new passphrase and masking of the passphrase is turned off. If passphrase formatting is enabled, then all non-breaking space characters are stripped from the entered passphrase. Passphrase formatting is mostly useful in combination with passphrases generated with the GENPIN feature of some Pinentries. Note that such a generated passphrase, if not modified by the user, skips all passphrase constraints checking because such constraints would actually weaken the generated passphrase. --pinentry-program filename Use program filename as the PIN entry. The default is installation dependent. With the default configuration the name of the default pinentry is ‘pinentry’; if that file does not exist but a ‘pinentry-basic’ exist the latter is used. On a Windows platform the default is to use the first existing program from this list: ‘bin\pinentry.exe’, ‘..\Gpg4win\bin\pinentry.exe’, ‘..\Gpg4win\pinentry.exe’, ‘..\GNU\GnuPG\pinentry.exe’, ‘..\GNU\bin\pinentry.exe’, ‘bin\pinentry-basic.exe’ where the file names are relative to the GnuPG installation directory. --pinentry-touch-file filename By default the filename of the socket gpg-agent is listening for requests is passed to Pinentry, so that it can touch that file before exiting (it does this only in curses mode). This option changes the file passed to Pinentry to filename. The special name /dev/null may be used to completely disable this feature. Note that Pinentry will not create that file, it will only change the modification and access time. --scdaemon-program filename Use program filename as the Smartcard daemon. The default is installation dependent and can be shown with the gpgconf command. --disable-scdaemon Do not make use of the scdaemon tool. This option has the effect of disabling the ability to do smartcard operations. Note, that enabling this option at runtime does not kill an already forked scdaemon. --disable-check-own-socket gpg-agent employs a periodic self-test to detect a stolen socket. This usually means a second instance of gpg-agent has taken over the socket and gpg-agent will then terminate itself. This option may be used to disable this self-test for debugging purposes. --use-standard-socket --no-use-standard-socket --use-standard-socket-p Since GnuPG 2.1 the standard socket is always used. These options have no more effect. The command gpg-agent --use-standard-socket-p will thus always return success. --display string --ttyname string --ttytype string --lc-ctype string --lc-messages string --xauthority string These options are used with the server mode to pass localization information. --keep-tty --keep-display Ignore requests to change the current tty or X window system's DISPLAY variable respectively. This is useful to lock the pinentry to pop up at the tty or display you started the agent. --listen-backlog n Set the size of the queue for pending connections. The default is 64. --extra-socket name The extra socket is created by default, you may use this option to change the name of the socket. To disable the creation of the socket use ``none'' or ``/dev/null'' for name. Also listen on native gpg-agent connections on the given socket. The intended use for this extra socket is to setup a Unix domain socket forwarding from a remote machine to this socket on the local machine. A gpg running on the remote machine may then connect to the local gpg-agent and use its private keys. This enables decrypting or signing data on a remote machine without exposing the private keys to the remote machine. --enable-extended-key-format --disable-extended-key-format These options are obsolete and have no effect. The extended key format is used for years now and has been supported since 2.1.12. Existing keys in the old format are migrated to the new format as soon as they are touched. --enable-ssh-support --enable-win32-openssh-support --enable-putty-support On Unix platforms the OpenSSH Agent protocol is always enabled, but gpg-agent will only set the SSH_AUTH_SOCK variable if the option enable-ssh-support is given. Some Linux distributions use the presence of this option to decide whether the old ssh- agent shall be started. On Windows support for the native ssh implementation must be enabled using the the option enable-win32-openssh-support. For using gpg-agent as a replacement for PuTTY's Pageant, the option enable-putty-support must be enabled. In this mode of operation, the agent does not only implement the gpg-agent protocol, but also the agent protocol used by OpenSSH (through a separate socket or via Named Pipes) or the protocol used by PuTTY. Consequently, this allows one to use the gpg- agent as a drop-in replacement for the ssh-agent. SSH keys, which are to be used through the agent, need to be added to the gpg-agent initially through the ssh-add utility. When a key is added, ssh-add will ask for the password of the provided key file and send the unprotected key material to the agent; this causes the gpg-agent to ask for a passphrase, which is to be used for encrypting the newly received key and storing it in a gpg-agent specific directory. Once a key has been added to the gpg-agent this way, the gpg- agent will be ready to use the key. Note: in case the gpg-agent receives a signature request, the user might need to be prompted for a passphrase, which is necessary for decrypting the stored key. Since the ssh-agent protocol does not contain a mechanism for telling the agent on which display/terminal it is running, gpg-agent's ssh-support will use the TTY or X display where gpg-agent has been started. To switch this display to the current one, the following command may be used: gpg-connect-agent updatestartuptty /bye Although all GnuPG components try to start the gpg-agent as needed, this is not possible for the ssh support because ssh does not know about it. Thus if no GnuPG tool which accesses the agent has been run, there is no guarantee that ssh is able to use gpg-agent for authentication. To fix this you may start gpg-agent if needed using this simple command: gpg-connect-agent /bye Adding the --verbose shows the progress of starting the agent. The --enable-putty-support is only available under Windows and allows the use of gpg-agent with the ssh implementation putty. This is similar to the regular ssh-agent support but makes use of Windows message queue as required by putty. The order in which keys are presented to ssh are: Negative Use-for-ssh values If a key file has the attribute "Use-for-ssh" and its value is negative, these keys are presented first to ssh. The negative values are capped at -999 with -999 being lower ranked than -1. These values can be used to prefer on-disk keys over keys taken from active cards. Active cards Active cards (inserted into a card reader or plugged in tokens) are always tried; they are ordered by their serial numbers. Keys listed in the sshcontrol file Non-disabled keys from the sshcontrol file are presented in the order they appear in this file. Note that the sshcontrol file is deprecated. Positive Use-for-ssh values If a key file has the attribute "Use-for-ssh" and its value is "yes", "true", or any positive number the key is presented in the order of their values. "yes" and "true" have a value of 1; other values are capped at 99999. Editing the "Use-for-ssh" values can be done with an editor or using gpg-connect-agent and "KEYATTR" (Remember to append a colon to the key; i.e. use "Use-for-ssh:"). --ssh-fingerprint-digest Select the digest algorithm used to compute ssh fingerprints that are communicated to the user, e.g. in pinentry dialogs. OpenSSH has transitioned from using MD5 to the more secure SHA256. --auto-expand-secmem n Allow Libgcrypt to expand its secure memory area as required. The optional value n is a non-negative integer with a suggested size in bytes of each additionally allocated secure memory area. The value is rounded up to the next 32 KiB; usual C style prefixes are allowed. For an heavy loaded gpg-agent with many concurrent connection this option avoids sign or decrypt errors due to out of secure memory error returns. --s2k-calibration milliseconds Change the default calibration time to milliseconds. The given value is capped at 60 seconds; a value of 0 resets to the compiled-in default. This option is re-read on a SIGHUP (or gpgconf --reload gpg-agent) and the S2K count is then re- calibrated. --s2k-count n Specify the iteration count used to protect the passphrase. This option can be used to override the auto-calibration done by default. The auto-calibration computes a count which requires by default 100ms to mangle a given passphrase. See also --s2k-calibration. To view the actually used iteration count and the milliseconds required for an S2K operation use: gpg-connect-agent 'GETINFO s2k_count' /bye gpg-connect-agent 'GETINFO s2k_time' /bye To view the auto-calibrated count use: gpg-connect-agent 'GETINFO s2k_count_cal' /bye
|
It is important to set the environment variable GPG_TTY in your login shell, for example in the ‘~/.bashrc’ init script: export GPG_TTY=$(tty) If you enabled the Ssh Agent Support, you also need to tell ssh about it by adding this to your init script: unset SSH_AGENT_PID if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" fi FILES There are a few configuration files needed for the operation of the agent. By default they may all be found in the current home directory (see: [option --homedir]). gpg-agent.conf This is the standard configuration file read by gpg-agent on startup. It may contain any valid long option; the leading two dashes may not be entered and the option may not be abbreviated. This file is also read after a SIGHUP however only a few options will actually have an effect. This default name may be changed on the command line (see: [option --options]). You should backup this file. trustlist.txt This is the list of trusted keys. You should backup this file. Comment lines, indicated by a leading hash mark, as well as empty lines are ignored. To mark a key as trusted you need to enter its fingerprint followed by a space and a capital letter S. Colons may optionally be used to separate the bytes of a fingerprint; this enables cutting and pasting the fingerprint from a key listing output. If the line is prefixed with a ! the key is explicitly marked as not trusted. Here is an example where two keys are marked as ultimately trusted and one as not trusted: .RS 2 # CN=Wurzel ZS 3,O=Intevation GmbH,C=DE A6935DD34EF3087973C706FC311AA2CCF733765B S # CN=PCA-1-Verwaltung-02/O=PKI-1-Verwaltung/C=DE DC:BD:69:25:48:BD:BB:7E:31:6E:BB:80:D3:00:80:35:D4:F8:A6:CD S # CN=Root-CA/O=Schlapphuete/L=Pullach/C=DE !14:56:98:D3:FE:9C:CA:5A:31:6E:BC:81:D3:11:4E:00:90:A3:44:C2 S .fi Before entering a key into this file, you need to ensure its authenticity. How to do this depends on your organisation; your administrator might have already entered those keys which are deemed trustworthy enough into this file. Places where to look for the fingerprint of a root certificate are letters received from the CA or the website of the CA (after making 100% sure that this is indeed the website of that CA). You may want to consider disallowing interactive updates of this file by using the [option --no-allow-mark-trusted]. It might even be advisable to change the permissions to read-only so that this file can't be changed inadvertently. As a special feature a line include-default will include a global list of trusted certificates (e.g. ‘/opt/homebrew/etc/gnupg/trustlist.txt’). This global list is also used if the local list is not available; the [option --no-user-trustlist] enforces the use of only this global list. It is possible to add further flags after the S for use by the caller: relax Relax checking of some root certificate requirements. As of now this flag allows the use of root certificates with a missing basicConstraints attribute (despite that it is a MUST for CA certificates) and disables CRL checking for the root certificate. cm If validation of a certificate finally issued by a CA with this flag set fails, try again using the chain validation model. qual The CA is allowed to issue certificates for qualified signatures. This flag has an effect only if used in the global list. This is now the preferred way to mark such CA; the old way of having a separate file ‘qualified.txt’ is still supported. de-vs The CA is part of an approved PKI for the German classification level VS-NfD. It is only valid in the global trustlist. As of now this is used only for documentation purpose. sshcontrol This file is used when support for the secure shell agent protocol has been enabled (see: [option --enable-ssh-support]). Only keys present in this file are used in the SSH protocol. You should backup this file. This file is deprecated in favor of the "Use-for-ssh" attribute in the key files. The ssh-add tool may be used to add new entries to this file; you may also add them manually. Comment lines, indicated by a leading hash mark, as well as empty lines are ignored. An entry starts with optional whitespace, followed by the keygrip of the key given as 40 hex digits, optionally followed by the caching TTL in seconds and another optional field for arbitrary flags. A non-zero TTL overrides the global default as set by --default-cache-ttl-ssh. The only flag support is confirm. If this flag is found for a key, each use of the key will pop up a pinentry to confirm the use of that key. The flag is automatically set if a new key was loaded into gpg-agent using the option -c of the ssh-add command. The keygrip may be prefixed with a ! to disable an entry. The following example lists exactly one key. Note that keys available through a OpenPGP smartcard in the active smartcard reader are implicitly added to this list; i.e. there is no need to list them. # Key added on: 2011-07-20 20:38:46 # Fingerprint: 5e:8d:c4:ad:e7:af:6e:27:8a:d6:13:e4:79:ad:0b:81 34B62F25E277CF13D3C6BCEBFD3F85D08F0A864B 0 confirm private-keys-v1.d/ This is the directory where gpg-agent stores the private keys. Each key is stored in a file with the name made up of the keygrip and the suffix ‘key’. You should backup all files in this directory and take great care to keep this backup closed away. Note that on larger installations, it is useful to put predefined files into the directory ‘/opt/homebrew/etc/skel/.gnupg’ so that newly created users start up with a working configuration. For existing users the a small helper script is provided to create these files (see: [addgnupghome]). SIGNALS A running gpg-agent may be controlled by signals, i.e. using the kill command to send a signal to the process. Here is a list of supported signals: SIGHUP This signal flushes all cached passphrases and if the program has been started with a configuration file, the configuration file is read again. Only certain options are honored: quiet, verbose, debug, debug-all, debug-level, debug-pinentry, no-grab, pinentry-program, pinentry-invisible-char, default-cache-ttl, max-cache-ttl, ignore-cache-for-signing, s2k-count, no-allow-external-cache, allow-emacs-pinentry, no-allow-mark-trusted, disable-scdaemon, and disable-check-own-socket. scdaemon-program is also supported but due to the current implementation, which calls the scdaemon only once, it is not of much use unless you manually kill the scdaemon. SIGTERM Shuts down the process but waits until all current requests are fulfilled. If the process has received 3 of these signals and requests are still pending, a shutdown is forced. SIGINT Shuts down the process immediately. SIGUSR1 Dump internal information to the log file. SIGUSR2 This signal is used for internal purposes. SEE ALSO gpg(1), gpgsm(1), gpgconf(1), gpg-connect-agent(1), scdaemon(1) The full documentation for this tool is maintained as a Texinfo manual. If GnuPG and the info program are properly installed at your site, the command info gnupg should give you access to the complete manual including a menu structure and an index. GnuPG 2.4.5 2024-03-04 GPG-AGENT(1)
|
tensorboard
| null | null | null | null | null |
pdffonts
|
Pdffonts lists the fonts used in a Portable Document Format (PDF) file along with various information for each font. If PDF-file is ´-', it reads the PDF file from stdin. The following information is listed for each font: name the font name, exactly as given in the PDF file (potentially including a subset prefix) type the font type – see below for details encoding the font encoding emb "yes" if the font is embedded in the PDF file sub "yes" if the font is a subset uni "yes" if there is an explicit "ToUnicode" map in the PDF file (the absence of a ToUnicode map doesn't necessarily mean that the text can't be converted to Unicode) object ID the font dictionary object ID (number and generation) PDF files can contain the following types of fonts: Type 1 Type 1C – aka Compact Font Format (CFF) Type 3 TrueType CID Type 0 – 16-bit font with no specified type CID Type 0C – 16-bit PostScript CFF font CID TrueType – 16-bit TrueType font
|
pdffonts - Portable Document Format (PDF) font analyzer (version 3.03)
|
pdffonts [options] [PDF-file]
|
-f number Specifies the first page to analyze. -l number Specifies the last page to analyze. -subst List the substitute fonts that poppler will use for non embedded fonts. -opw password Specify the owner password for the PDF file. Providing this will bypass all security restrictions. -upw password Specify the user password for the PDF file. -v Print copyright and version information. -h Print usage information. (-help and --help are equivalent.) EXIT CODES The Xpdf tools use the following exit codes: 0 No error. 1 Error opening a PDF file. 2 Error opening an output file. 3 Error related to PDF permissions. 99 Other error. AUTHOR The pdffonts software and documentation are copyright 1996–2011 Glyph & Cog, LLC. SEE ALSO pdfdetach(1), pdfimages(1), pdfinfo(1), pdftocairo(1), pdftohtml(1), pdftoppm(1), pdftops(1), pdftotext(1), pdfseparate(1), pdfsig(1), pdfunite(1) 15 August 2011 pdffonts(1)
| null |
sha1sum
|
Print or check SHA1 (160-bit) checksums. With no FILE, or when FILE is -, read standard input. -b, --binary read in binary mode -c, --check read checksums from the FILEs and check them --tag create a BSD-style checksum -t, --text read in text mode (default) -z, --zero end each output line with NUL, not newline, and disable file name escaping The following five options are useful only when verifying checksums: --ignore-missing don't fail or report status for missing files --quiet don't print OK for each successfully verified file --status don't output anything, status code shows success --strict exit non-zero for improperly formatted checksum lines -w, --warn warn about improperly formatted checksum lines --help display this help and exit --version output version information and exit The sums are computed as described in FIPS-180-1. When checking, the input should be a former output of this program. The default mode is to print a line with: checksum, a space, a character indicating input mode ('*' for binary, ' ' for text or where binary is insignificant), and name for each FILE. Note: There is no difference between binary mode and text mode on GNU systems. BUGS Do not use the SHA-1 algorithm for security related purposes. Instead, use an SHA-2 algorithm, implemented in the programs sha224sum(1), sha256sum(1), sha384sum(1), sha512sum(1), or the BLAKE2 algorithm, implemented in b2sum(1) AUTHOR Written by Ulrich Drepper, Scott Miller, and David Madore. REPORTING BUGS GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Report any translation bugs to <https://translationproject.org/team/> COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO cksum(1) Full documentation <https://www.gnu.org/software/coreutils/sha1sum> or available locally via: info '(coreutils) sha1sum invocation' GNU coreutils 9.3 April 2023 SHA1SUM(1)
|
sha1sum - compute and check SHA1 message digest
|
sha1sum [OPTION]... [FILE]...
| null | null |
transicc
|
lcms is a standalone CMM engine, which deals with the color management. It implements a fast transformation between ICC profiles. transicc is a lcms ColorSpace conversion calculator.
|
transicc - little cms ColorSpace conversion calculator.
|
transicc [options] [CGATSINPUT] [CGATSOUTPUT]
|
-b Black point compensation. -c NUM Precalculates transform (0=Off, 1=Normal, 2=Hi-res, 3=LoRes) [defaults to 1]. -d NUM Observer adaptation state (abs.col. only), (0..1.0, float value) [defaults to 0.0]. -e Encoded representation of numbers is not float (Option -w=use 16 bits, Option -x=hexadecimal). -g Marks out-of-gamut colors on softproof. -i profile Input profile (defaults to sRGB). -l Transform by device-link profile. -m NUM SoftProof intent (0,1,2,3) [defaults to 0]. -n Terse output, intended for pipe usage. -o profile Output profile (defaults to sRGB). -q Quantize CGATS to 8 bits. -s Bounded mode. -t NUM Rendering intent 0=Perceptual [default] 1=Relative colorimetric 2=Saturation 3=Absolute colorimetric 10=Perceptual preserving black ink 11=Relative colorimetric preserving black ink 12=Saturation preserving black ink 13=Perceptual preserving black plane 14=Relative colorimetric preserving black plane 15=Saturation preserving black plane -v verbosity Verbosity level, (0=None, 1=Normal, 2=High, 3=Very High) [defaults to 1]. -w Use 16 bits. -x Hexadecimal. You can use '*Lab' and '*xyz' as built-in profiles. NOTES For suggestions, comments, bug reports etc. send mail to info@littlecms.com. SEE ALSO jpgicc(1), linkicc(1), psicc(1), tificc(1) AUTHOR This manual page was written by Shiju p. Nair <shiju.p@gmail.com>, for the Debian project. May 30, 2011 TRANSICC(1)
| null |
exrstdattr
| null | null | null | null | null |
wrjpgcom
|
wrjpgcom reads the named JPEG/JFIF file, or the standard input if no file is named, and generates a new JPEG/JFIF file on standard output. A comment block is added to the file. The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. Although the standard doesn't actually define what COM blocks are for, they are widely used to hold user-supplied text strings. This lets you add annotations, titles, index terms, etc to your JPEG files, and later retrieve them as text. COM blocks do not interfere with the image stored in the JPEG file. The maximum size of a COM block is 64K, but you can have as many of them as you like in one JPEG file. wrjpgcom adds a COM block, containing text you provide, to a JPEG file. Ordinarily, the COM block is added after any existing COM blocks; but you can delete the old COM blocks if you wish.
|
wrjpgcom - insert text comments into a JPEG file
|
wrjpgcom [ -replace ] [ -comment text ] [ -cfile name ] [ filename ]
|
Switch names may be abbreviated, and are not case sensitive. -replace Delete any existing COM blocks from the file. -comment text Supply text for new COM block on command line. -cfile name Read text for new COM block from named file. If you have only one line of comment text to add, you can provide it on the command line with -comment. The comment text must be surrounded with quotes so that it is treated as a single argument. Longer comments can be read from a text file. If you give neither -comment nor -cfile, then wrjpgcom will read the comment text from standard input. (In this case an input image file name MUST be supplied, so that the source JPEG file comes from somewhere else.) You can enter multiple lines, up to 64KB worth. Type an end-of-file indicator (usually control-D) to terminate the comment text entry. wrjpgcom will not add a COM block if the provided comment string is empty. Therefore -replace -comment "" can be used to delete all COM blocks from a file.
|
Add a short comment to in.jpg, producing out.jpg: wrjpgcom -c "View of my back yard" in.jpg > out.jpg Attach a long comment previously stored in comment.txt: wrjpgcom in.jpg < comment.txt > out.jpg or equivalently wrjpgcom -cfile comment.txt < in.jpg > out.jpg SEE ALSO cjpeg(1), djpeg(1), jpegtran(1), rdjpgcom(1) AUTHOR Independent JPEG Group 15 June 1995 WRJPGCOM(1)
|
combine_tessdata
| null | null | null | null | null |
ffprobe
|
ffprobe gathers information from multimedia streams and prints it in human- and machine-readable fashion. For example it can be used to check the format of the container used by a multimedia stream and the format and type of each media stream contained in it. If a url is specified in input, ffprobe will try to open and probe the url content. If the url cannot be opened or recognized as a multimedia file, a positive exit code is returned. If no output is specified as output with o ffprobe will write to stdout. ffprobe may be employed both as a standalone application or in combination with a textual filter, which may perform more sophisticated processing, e.g. statistical processing or plotting. Options are used to list some of the formats supported by ffprobe or for specifying which information to display, and for setting how ffprobe will show it. ffprobe output is designed to be easily parsable by a textual filter, and consists of one or more sections of a form defined by the selected writer, which is specified by the output_format option. Sections may contain other nested sections, and are identified by a name (which may be shared by other sections), and an unique name. See the output of sections. Metadata tags stored in the container or in the streams are recognized and printed in the corresponding "FORMAT", "STREAM", "STREAM_GROUP_STREAM" or "PROGRAM_STREAM" section.
|
ffprobe - ffprobe media prober
|
ffprobe [options] input_url
|
All the numerical options, if not specified otherwise, accept a string representing a number as input, which may be followed by one of the SI unit prefixes, for example: 'K', 'M', or 'G'. If 'i' is appended to the SI unit prefix, the complete prefix will be interpreted as a unit prefix for binary multiples, which are based on powers of 1024 instead of powers of 1000. Appending 'B' to the SI unit prefix multiplies the value by 8. This allows using, for example: 'KB', 'MiB', 'G' and 'B' as number suffixes. Options which do not take arguments are boolean options, and set the corresponding value to true. They can be set to false by prefixing the option name with "no". For example using "-nofoo" will set the boolean option with name "foo" to false. Options that take arguments support a special syntax where the argument given on the command line is interpreted as a path to the file from which the actual argument value is loaded. To use this feature, add a forward slash '/' immediately before the option name (after the leading dash). E.g. ffmpeg -i INPUT -/filter:v filter.script OUTPUT will load a filtergraph description from the file named filter.script. Stream specifiers Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers are used to precisely specify which stream(s) a given option belongs to. A stream specifier is a string generally appended to the option name and separated from it by a colon. E.g. "-codec:a:1 ac3" contains the "a:1" stream specifier, which matches the second audio stream. Therefore, it would select the ac3 codec for the second audio stream. A stream specifier can match several streams, so that the option is applied to all of them. E.g. the stream specifier in "-b:a 128k" matches all audio streams. An empty stream specifier matches all streams. For example, "-codec copy" or "-codec: copy" would copy all the streams without reencoding. Possible forms of stream specifiers are: stream_index Matches the stream with this index. E.g. "-threads:1 4" would set the thread count for the second stream to 4. If stream_index is used as an additional stream specifier (see below), then it selects stream number stream_index from the matching streams. Stream numbering is based on the order of the streams as detected by libavformat except when a stream group specifier or program ID is also specified. In this case it is based on the ordering of the streams in the group or program. stream_type[:additional_stream_specifier] stream_type is one of following: 'v' or 'V' for video, 'a' for audio, 's' for subtitle, 'd' for data, and 't' for attachments. 'v' matches all video streams, 'V' only matches video streams which are not attached pictures, video thumbnails or cover arts. If additional_stream_specifier is used, then it matches streams which both have this type and match the additional_stream_specifier. Otherwise, it matches all streams of the specified type. g:group_specifier[:additional_stream_specifier] Matches streams which are in the group with the specifier group_specifier. if additional_stream_specifier is used, then it matches streams which both are part of the group and match the additional_stream_specifier. group_specifier may be one of the following: group_index Match the stream with this group index. #group_id or i:group_id Match the stream with this group id. p:program_id[:additional_stream_specifier] Matches streams which are in the program with the id program_id. If additional_stream_specifier is used, then it matches streams which both are part of the program and match the additional_stream_specifier. #stream_id or i:stream_id Match the stream by stream id (e.g. PID in MPEG-TS container). m:key[:value] Matches streams with the metadata tag key having the specified value. If value is not given, matches streams that contain the given tag with any value. u Matches streams with usable configuration, the codec must be defined and the essential information such as video dimension or audio sample rate must be present. Note that in ffmpeg, matching by metadata will only work properly for input files. Generic options These options are shared amongst the ff* tools. -L Show license. -h, -?, -help, --help [arg] Show help. An optional parameter may be specified to print help about a specific item. If no argument is specified, only basic (non advanced) tool options are shown. Possible values of arg are: long Print advanced tool options in addition to the basic tool options. full Print complete list of options, including shared and private options for encoders, decoders, demuxers, muxers, filters, etc. decoder=decoder_name Print detailed information about the decoder named decoder_name. Use the -decoders option to get a list of all decoders. encoder=encoder_name Print detailed information about the encoder named encoder_name. Use the -encoders option to get a list of all encoders. demuxer=demuxer_name Print detailed information about the demuxer named demuxer_name. Use the -formats option to get a list of all demuxers and muxers. muxer=muxer_name Print detailed information about the muxer named muxer_name. Use the -formats option to get a list of all muxers and demuxers. filter=filter_name Print detailed information about the filter named filter_name. Use the -filters option to get a list of all filters. bsf=bitstream_filter_name Print detailed information about the bitstream filter named bitstream_filter_name. Use the -bsfs option to get a list of all bitstream filters. protocol=protocol_name Print detailed information about the protocol named protocol_name. Use the -protocols option to get a list of all protocols. -version Show version. -buildconf Show the build configuration, one option per line. -formats Show available formats (including devices). -demuxers Show available demuxers. -muxers Show available muxers. -devices Show available devices. -codecs Show all codecs known to libavcodec. Note that the term 'codec' is used throughout this documentation as a shortcut for what is more correctly called a media bitstream format. -decoders Show available decoders. -encoders Show all available encoders. -bsfs Show available bitstream filters. -protocols Show available protocols. -filters Show available libavfilter filters. -pix_fmts Show available pixel formats. -sample_fmts Show available sample formats. -layouts Show channel names and standard channel layouts. -dispositions Show stream dispositions. -colors Show recognized color names. -sources device[,opt1=val1[,opt2=val2]...] Show autodetected sources of the input device. Some devices may provide system-dependent source names that cannot be autodetected. The returned list cannot be assumed to be always complete. ffmpeg -sources pulse,server=192.168.0.4 -sinks device[,opt1=val1[,opt2=val2]...] Show autodetected sinks of the output device. Some devices may provide system-dependent sink names that cannot be autodetected. The returned list cannot be assumed to be always complete. ffmpeg -sinks pulse,server=192.168.0.4 -loglevel [flags+]loglevel | -v [flags+]loglevel Set logging level and flags used by the library. The optional flags prefix can consist of the following values: repeat Indicates that repeated log output should not be compressed to the first line and the "Last message repeated n times" line will be omitted. level Indicates that log output should add a "[level]" prefix to each message line. This can be used as an alternative to log coloring, e.g. when dumping the log to file. Flags can also be used alone by adding a '+'/'-' prefix to set/reset a single flag without affecting other flags or changing loglevel. When setting both flags and loglevel, a '+' separator is expected between the last flags value and before loglevel. loglevel is a string or a number containing one of the following values: quiet, -8 Show nothing at all; be silent. panic, 0 Only show fatal errors which could lead the process to crash, such as an assertion failure. This is not currently used for anything. fatal, 8 Only show fatal errors. These are errors after which the process absolutely cannot continue. error, 16 Show all errors, including ones which can be recovered from. warning, 24 Show all warnings and errors. Any message related to possibly incorrect or unexpected events will be shown. info, 32 Show informative messages during processing. This is in addition to warnings and errors. This is the default value. verbose, 40 Same as "info", except more verbose. debug, 48 Show everything, including debugging information. trace, 56 For example to enable repeated log output, add the "level" prefix, and set loglevel to "verbose": ffmpeg -loglevel repeat+level+verbose -i input output Another example that enables repeated log output without affecting current state of "level" prefix flag or loglevel: ffmpeg [...] -loglevel +repeat By default the program logs to stderr. If coloring is supported by the terminal, colors are used to mark errors and warnings. Log coloring can be disabled setting the environment variable AV_LOG_FORCE_NOCOLOR, or can be forced setting the environment variable AV_LOG_FORCE_COLOR. -report Dump full command line and log output to a file named "program-YYYYMMDD-HHMMSS.log" in the current directory. This file can be useful for bug reports. It also implies "-loglevel debug". Setting the environment variable FFREPORT to any value has the same effect. If the value is a ':'-separated key=value sequence, these options will affect the report; option values must be escaped if they contain special characters or the options delimiter ':' (see the ``Quoting and escaping'' section in the ffmpeg-utils manual). The following options are recognized: file set the file name to use for the report; %p is expanded to the name of the program, %t is expanded to a timestamp, "%%" is expanded to a plain "%" level set the log verbosity level using a numerical value (see "-loglevel"). For example, to output a report to a file named ffreport.log using a log level of 32 (alias for log level "info"): FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output Errors in parsing the environment variable are not fatal, and will not appear in the report. -hide_banner Suppress printing banner. All FFmpeg tools will normally show a copyright notice, build options and library versions. This option can be used to suppress printing this information. -cpuflags flags (global) Allows setting and clearing cpu flags. This option is intended for testing. Do not use it unless you know what you're doing. ffmpeg -cpuflags -sse+mmx ... ffmpeg -cpuflags mmx ... ffmpeg -cpuflags 0 ... Possible flags for this option are: x86 mmx mmxext sse sse2 sse2slow sse3 sse3slow ssse3 atom sse4.1 sse4.2 avx avx2 xop fma3 fma4 3dnow 3dnowext bmi1 bmi2 cmov ARM armv5te armv6 armv6t2 vfp vfpv3 neon setend AArch64 armv8 vfp neon PowerPC altivec Specific Processors pentium2 pentium3 pentium4 k6 k62 athlon athlonxp k8 -cpucount count (global) Override detection of CPU count. This option is intended for testing. Do not use it unless you know what you're doing. ffmpeg -cpucount 2 -max_alloc bytes Set the maximum size limit for allocating a block on the heap by ffmpeg's family of malloc functions. Exercise extreme caution when using this option. Don't use if you do not understand the full consequence of doing so. Default is INT_MAX. AVOptions These options are provided directly by the libavformat, libavdevice and libavcodec libraries. To see the list of available AVOptions, use the -help option. They are separated into two categories: generic These options can be set for any container, codec or device. Generic options are listed under AVFormatContext options for containers/devices and under AVCodecContext options for codecs. private These options are specific to the given container, device or codec. Private options are listed under their corresponding containers/devices/codecs. For example to write an ID3v2.3 header instead of a default ID3v2.4 to an MP3 file, use the id3v2_version private option of the MP3 muxer: ffmpeg -i input.flac -id3v2_version 3 out.mp3 All codec AVOptions are per-stream, and thus a stream specifier should be attached to them: ffmpeg -i multichannel.mxf -map 0:v:0 -map 0:a:0 -map 0:a:0 -c:a:0 ac3 -b:a:0 640k -ac:a:1 2 -c:a:1 aac -b:2 128k out.mp4 In the above example, a multichannel audio stream is mapped twice for output. The first instance is encoded with codec ac3 and bitrate 640k. The second instance is downmixed to 2 channels and encoded with codec aac. A bitrate of 128k is specified for it using absolute index of the output stream. Note: the -nooption syntax cannot be used for boolean AVOptions, use -option 0/-option 1. Note: the old undocumented way of specifying per-stream AVOptions by prepending v/a/s to the options name is now obsolete and will be removed soon. Main options -f format Force format to use. -unit Show the unit of the displayed values. -prefix Use SI prefixes for the displayed values. Unless the "-byte_binary_prefix" option is used all the prefixes are decimal. -byte_binary_prefix Force the use of binary prefixes for byte values. -sexagesimal Use sexagesimal format HH:MM:SS.MICROSECONDS for time values. -pretty Prettify the format of the displayed values, it corresponds to the options "-unit -prefix -byte_binary_prefix -sexagesimal". -output_format, -of, -print_format writer_name[=writer_options] Set the output printing format. writer_name specifies the name of the writer, and writer_options specifies the options to be passed to the writer. For example for printing the output in JSON format, specify: -output_format json For more details on the available output printing formats, see the Writers section below. -sections Print sections structure and section information, and exit. The output is not meant to be parsed by a machine. -select_streams stream_specifier Select only the streams specified by stream_specifier. This option affects only the options related to streams (e.g. "show_streams", "show_packets", etc.). For example to show only audio streams, you can use the command: ffprobe -show_streams -select_streams a INPUT To show only video packets belonging to the video stream with index 1: ffprobe -show_packets -select_streams v:1 INPUT -show_data Show payload data, as a hexadecimal and ASCII dump. Coupled with -show_packets, it will dump the packets' data. Coupled with -show_streams, it will dump the codec extradata. The dump is printed as the "data" field. It may contain newlines. -show_data_hash algorithm Show a hash of payload data, for packets with -show_packets and for codec extradata with -show_streams. -show_error Show information about the error found when trying to probe the input. The error information is printed within a section with name "ERROR". -show_format Show information about the container format of the input multimedia stream. All the container format information is printed within a section with name "FORMAT". -show_format_entry name Like -show_format, but only prints the specified entry of the container format information, rather than all. This option may be given more than once, then all specified entries will be shown. This option is deprecated, use "show_entries" instead. -show_entries section_entries Set list of entries to show. Entries are specified according to the following syntax. section_entries contains a list of section entries separated by ":". Each section entry is composed by a section name (or unique name), optionally followed by a list of entries local to that section, separated by ",". If section name is specified but is followed by no "=", all entries are printed to output, together with all the contained sections. Otherwise only the entries specified in the local section entries list are printed. In particular, if "=" is specified but the list of local entries is empty, then no entries will be shown for that section. Note that the order of specification of the local section entries is not honored in the output, and the usual display order will be retained. The formal syntax is given by: <LOCAL_SECTION_ENTRIES> ::= <SECTION_ENTRY_NAME>[,<LOCAL_SECTION_ENTRIES>] <SECTION_ENTRY> ::= <SECTION_NAME>[=[<LOCAL_SECTION_ENTRIES>]] <SECTION_ENTRIES> ::= <SECTION_ENTRY>[:<SECTION_ENTRIES>] For example, to show only the index and type of each stream, and the PTS time, duration time, and stream index of the packets, you can specify the argument: packet=pts_time,duration_time,stream_index : stream=index,codec_type To show all the entries in the section "format", but only the codec type in the section "stream", specify the argument: format : stream=codec_type To show all the tags in the stream and format sections: stream_tags : format_tags To show only the "title" tag (if available) in the stream sections: stream_tags=title -show_packets Show information about each packet contained in the input multimedia stream. The information for each single packet is printed within a dedicated section with name "PACKET". -show_frames Show information about each frame and subtitle contained in the input multimedia stream. The information for each single frame is printed within a dedicated section with name "FRAME" or "SUBTITLE". -show_log loglevel Show logging information from the decoder about each frame according to the value set in loglevel, (see "-loglevel"). This option requires "-show_frames". The information for each log message is printed within a dedicated section with name "LOG". -show_streams Show information about each media stream contained in the input multimedia stream. Each media stream information is printed within a dedicated section with name "STREAM". -show_programs Show information about programs and their streams contained in the input multimedia stream. Each media stream information is printed within a dedicated section with name "PROGRAM_STREAM". -show_stream_groups Show information about stream groups and their streams contained in the input multimedia stream. Each media stream information is printed within a dedicated section with name "STREAM_GROUP_STREAM". -show_chapters Show information about chapters stored in the format. Each chapter is printed within a dedicated section with name "CHAPTER". -count_frames Count the number of frames per stream and report it in the corresponding stream section. -count_packets Count the number of packets per stream and report it in the corresponding stream section. -read_intervals read_intervals Read only the specified intervals. read_intervals must be a sequence of interval specifications separated by ",". ffprobe will seek to the interval starting point, and will continue reading from that. Each interval is specified by two optional parts, separated by "%". The first part specifies the interval start position. It is interpreted as an absolute position, or as a relative offset from the current position if it is preceded by the "+" character. If this first part is not specified, no seeking will be performed when reading this interval. The second part specifies the interval end position. It is interpreted as an absolute position, or as a relative offset from the current position if it is preceded by the "+" character. If the offset specification starts with "#", it is interpreted as the number of packets to read (not including the flushing packets) from the interval start. If no second part is specified, the program will read until the end of the input. Note that seeking is not accurate, thus the actual interval start point may be different from the specified position. Also, when an interval duration is specified, the absolute end time will be computed by adding the duration to the interval start point found by seeking the file, rather than to the specified start value. The formal syntax is given by: <INTERVAL> ::= [<START>|+<START_OFFSET>][%[<END>|+<END_OFFSET>]] <INTERVALS> ::= <INTERVAL>[,<INTERVALS>] A few examples follow. • Seek to time 10, read packets until 20 seconds after the found seek point, then seek to position "01:30" (1 minute and thirty seconds) and read packets until position "01:45". 10%+20,01:30%01:45 • Read only 42 packets after seeking to position "01:23": 01:23%+#42 • Read only the first 20 seconds from the start: %+20 • Read from the start until position "02:30": %02:30 -show_private_data, -private Show private data, that is data depending on the format of the particular shown element. This option is enabled by default, but you may need to disable it for specific uses, for example when creating XSD-compliant XML output. -show_program_version Show information related to program version. Version information is printed within a section with name "PROGRAM_VERSION". -show_library_versions Show information related to library versions. Version information for each library is printed within a section with name "LIBRARY_VERSION". -show_versions Show information related to program and library versions. This is the equivalent of setting both -show_program_version and -show_library_versions options. -show_pixel_formats Show information about all pixel formats supported by FFmpeg. Pixel format information for each format is printed within a section with name "PIXEL_FORMAT". -show_optional_fields value Some writers viz. JSON and XML, omit the printing of fields with invalid or non-applicable values, while other writers always print them. This option enables one to control this behaviour. Valid values are "always"/1, "never"/0 and "auto"/"-1". Default is auto. -bitexact Force bitexact output, useful to produce output which is not dependent on the specific build. -i input_url Read input_url. -o output_url Write output to output_url. If not specified, the output is sent to stdout. WRITERS A writer defines the output format adopted by ffprobe, and will be used for printing all the parts of the output. A writer may accept one or more arguments, which specify the options to adopt. The options are specified as a list of key=value pairs, separated by ":". All writers support the following options: string_validation, sv Set string validation mode. The following values are accepted. fail The writer will fail immediately in case an invalid string (UTF-8) sequence or code point is found in the input. This is especially useful to validate input metadata. ignore Any validation error will be ignored. This will result in possibly broken output, especially with the json or xml writer. replace The writer will substitute invalid UTF-8 sequences or code points with the string specified with the string_validation_replacement. Default value is replace. string_validation_replacement, svr Set replacement string to use in case string_validation is set to replace. In case the option is not specified, the writer will assume the empty string, that is it will remove the invalid sequences from the input strings. A description of the currently available writers follows. default Default format. Print each section in the form: [SECTION] key1=val1 ... keyN=valN [/SECTION] Metadata tags are printed as a line in the corresponding FORMAT, STREAM, STREAM_GROUP_STREAM or PROGRAM_STREAM section, and are prefixed by the string "TAG:". A description of the accepted options follows. nokey, nk If set to 1 specify not to print the key of each field. Default value is 0. noprint_wrappers, nw If set to 1 specify not to print the section header and footer. Default value is 0. compact, csv Compact and CSV format. The "csv" writer is equivalent to "compact", but supports different defaults. Each section is printed on a single line. If no option is specified, the output has the form: section|key1=val1| ... |keyN=valN Metadata tags are printed in the corresponding "format" or "stream" section. A metadata tag key, if printed, is prefixed by the string "tag:". The description of the accepted options follows. item_sep, s Specify the character to use for separating fields in the output line. It must be a single printable character, it is "|" by default ("," for the "csv" writer). nokey, nk If set to 1 specify not to print the key of each field. Its default value is 0 (1 for the "csv" writer). escape, e Set the escape mode to use, default to "c" ("csv" for the "csv" writer). It can assume one of the following values: c Perform C-like escaping. Strings containing a newline (\n), carriage return (\r), a tab (\t), a form feed (\f), the escaping character (\) or the item separator character SEP are escaped using C-like fashioned escaping, so that a newline is converted to the sequence \n, a carriage return to \r, \ to \\ and the separator SEP is converted to \SEP. csv Perform CSV-like escaping, as described in RFC4180. Strings containing a newline (\n), a carriage return (\r), a double quote ("), or SEP are enclosed in double-quotes. none Perform no escaping. print_section, p Print the section name at the beginning of each line if the value is 1, disable it with value set to 0. Default value is 1. flat Flat format. A free-form output where each line contains an explicit key=value, such as "streams.stream.3.tags.foo=bar". The output is shell escaped, so it can be directly embedded in sh scripts as long as the separator character is an alphanumeric character or an underscore (see sep_char option). The description of the accepted options follows. sep_char, s Separator character used to separate the chapter, the section name, IDs and potential tags in the printed field key. Default value is .. hierarchical, h Specify if the section name specification should be hierarchical. If set to 1, and if there is more than one section in the current chapter, the section name will be prefixed by the name of the chapter. A value of 0 will disable this behavior. Default value is 1. ini INI format output. Print output in an INI based format. The following conventions are adopted: • all key and values are UTF-8 • . is the subgroup separator • newline, \t, \f, \b and the following characters are escaped • \ is the escape character • # is the comment indicator • = is the key/value separator • : is not used but usually parsed as key/value separator This writer accepts options as a list of key=value pairs, separated by :. The description of the accepted options follows. hierarchical, h Specify if the section name specification should be hierarchical. If set to 1, and if there is more than one section in the current chapter, the section name will be prefixed by the name of the chapter. A value of 0 will disable this behavior. Default value is 1. json JSON based format. Each section is printed using JSON notation. The description of the accepted options follows. compact, c If set to 1 enable compact output, that is each section will be printed on a single line. Default value is 0. For more information about JSON, see <http://www.json.org/>. xml XML based format. The XML output is described in the XML schema description file ffprobe.xsd installed in the FFmpeg datadir. An updated version of the schema can be retrieved at the url <http://www.ffmpeg.org/schema/ffprobe.xsd>, which redirects to the latest schema committed into the FFmpeg development source code tree. Note that the output issued will be compliant to the ffprobe.xsd schema only when no special global output options (unit, prefix, byte_binary_prefix, sexagesimal etc.) are specified. The description of the accepted options follows. fully_qualified, q If set to 1 specify if the output should be fully qualified. Default value is 0. This is required for generating an XML file which can be validated through an XSD file. xsd_strict, x If set to 1 perform more checks for ensuring that the output is XSD compliant. Default value is 0. This option automatically sets fully_qualified to 1. For more information about the XML format, see <https://www.w3.org/XML/>. TIMECODE ffprobe supports Timecode extraction: • MPEG1/2 timecode is extracted from the GOP, and is available in the video stream details (-show_streams, see timecode). • MOV timecode is extracted from tmcd track, so is available in the tmcd stream metadata (-show_streams, see TAG:timecode). • DV, GXF and AVI timecodes are available in format metadata (-show_format, see TAG:timecode). SEE ALSO ffprobe-all(1), ffmpeg(1), ffplay(1), ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1), ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1), ffmpeg-devices(1), ffmpeg-protocols(1), ffmpeg-filters(1) AUTHORS The FFmpeg developers. For details about the authorship, see the Git history of the project (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command git log in the FFmpeg source directory, or browsing the online repository at <https://git.ffmpeg.org/ffmpeg>. Maintainers for the specific components are listed in the file MAINTAINERS in the source code tree. FFPROBE(1)
| null |
sha256sum
|
Print or check SHA256 (256-bit) checksums. With no FILE, or when FILE is -, read standard input. -b, --binary read in binary mode -c, --check read checksums from the FILEs and check them --tag create a BSD-style checksum -t, --text read in text mode (default) -z, --zero end each output line with NUL, not newline, and disable file name escaping The following five options are useful only when verifying checksums: --ignore-missing don't fail or report status for missing files --quiet don't print OK for each successfully verified file --status don't output anything, status code shows success --strict exit non-zero for improperly formatted checksum lines -w, --warn warn about improperly formatted checksum lines --help display this help and exit --version output version information and exit The sums are computed as described in FIPS-180-2. When checking, the input should be a former output of this program. The default mode is to print a line with: checksum, a space, a character indicating input mode ('*' for binary, ' ' for text or where binary is insignificant), and name for each FILE. Note: There is no difference between binary mode and text mode on GNU systems. AUTHOR Written by Ulrich Drepper, Scott Miller, and David Madore. REPORTING BUGS GNU coreutils online help: <https://www.gnu.org/software/coreutils/> Report any translation bugs to <https://translationproject.org/team/> COPYRIGHT Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO cksum(1) Full documentation <https://www.gnu.org/software/coreutils/sha256sum> or available locally via: info '(coreutils) sha2 utilities' GNU coreutils 9.3 April 2023 SHA256SUM(1)
|
sha256sum - compute and check SHA256 message digest
|
sha256sum [OPTION]... [FILE]...
| null | null |
convertfilestopdf
| null | null | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.