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 |
|---|---|---|---|---|---|
crypto_examples
| null | null | null | null | null |
gstdbuf
|
Run COMMAND, with modified buffering operations for its standard streams. Mandatory arguments to long options are mandatory for short options too. -i, --input=MODE adjust standard input stream buffering -o, --output=MODE adjust standard output stream buffering -e, --error=MODE adjust standard error stream buffering --help display this help and exit --version output version information and exit If MODE is 'L' the corresponding stream will be line buffered. This option is invalid with standard input. If MODE is '0' the corresponding stream will be unbuffered. Otherwise MODE is a number which may be followed by one of the following: KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G,T,P,E,Z,Y,R,Q. Binary prefixes can be used, too: KiB=K, MiB=M, and so on. In this case the corresponding stream will be fully buffered with the buffer size set to MODE bytes. NOTE: If COMMAND adjusts the buffering of its standard streams ('tee' does for example) then that will override corresponding changes by 'stdbuf'. Also some filters (like 'dd' and 'cat' etc.) don't use streams for I/O, and are thus unaffected by 'stdbuf' settings. Exit status: 125 if the stdbuf command itself fails 126 if COMMAND is found but cannot be invoked 127 if COMMAND cannot be found - the exit status of COMMAND otherwise
|
stdbuf - Run COMMAND, with modified buffering operations for its standard streams.
|
stdbuf OPTION... COMMAND
| null |
tail -f access.log | stdbuf -oL cut -d ' ' -f1 | uniq This will immediately display unique entries from access.log BUGS On GLIBC platforms, specifying a buffer size, i.e., using fully buffered mode will result in undefined operation. AUTHOR Written by Padraig Brady. 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/stdbuf> or available locally via: info '(coreutils) stdbuf invocation' GNU coreutils 9.3 April 2023 STDBUF(1)
|
crmftest
| null | null | null | null | null |
pk11ectest
| null | null | null | null | null |
makepqg
| null | null | null | null | null |
gi-inspect-typelib
| null | null | null | null | null |
zipdetails
|
This program creates a detailed report on the internal structure of zip files. For each item of metadata within a zip file the program will output the offset into the zip file where the item is located. a textual representation for the item. an optional hex dump of the item. The program assumes a prior understanding of the internal structure of Zip files. You should have a copy of the Zip APPNOTE.TXT <http://www.pkware.com/documents/casestudies/APPNOTE.TXT> file at hand to help understand the output from this program. Default Behaviour By default the program expects to be given a well-formed zip file. It will navigate the Zip file by first parsing the zip central directory at the end of the file. If that is found, it will then walk through the zip records starting at the beginning of the file. Any badly formed zip data structures encountered are likely to terminate the program. If the program finds any structural problems with the zip file it will print a summary at the end of the output report. The set of error cases reported is very much a work in progress, so don't rely on this feature to find all the possible errors in a zip file. If you have suggestions for use-cases where this could be enhanced please consider creating an enhancement request (see "SUPPORT"). Date/time fields are found in zip files are displayed in local time. Use the "--utc" option to display these fields in Coordinated Universal Time (UTC). Scan-Mode If you do have a potentially corrupt zip file, particulatly where the central directory at the end of the file is absent/incomplete, you can try usng the "--scan" option to search for zip records that are still present. When Scan-mode is enabled, the program will walk the zip file from the start, blindly looking for the 4-byte signatures that preceed each of the zip data structures. If it finds any of the recognised signatures it will attempt to dump the associated zip record. For very large zip files, this operation can take a long time to run. Note that the 4-byte signatures used in zip files can sometimes match with random data stored in the zip file, so care is needed interpreting the results.
|
zipdetails - display the internal structure of zip files
|
zipdetails [-v][--scan][--redact][--utc] zipfile.zip zipdetails -h zipdetails --version
|
-h Display help --redact Obscure filenames in the output. Handy for the use case where the zip files contains sensitive data that cannot be shared. --scan Walk the zip file loking for possible zip records. Can be error- prone. See "Scan-Mode" --utc By default, date/time fields are displayed in local time. Use this option to display them in in Coordinated Universal Time (UTC). -v Enable Verbose mode. See "Verbose Output". --version Display version number of the program and exit. Default Output By default zipdetails will output the details of the zip file in three columns. Column 1 This contains the offset from the start of the file in hex. Column 2 This contains a textual description of the field. Column 3 If the field contains a numeric value it will be displayed in hex. Zip stores most numbers in little-endian format - the value displayed will have the little-endian encoding removed. Next, is an optional description of what the value means. For example, assuming you have a zip file with two entries, like this $ unzip -l test.zip Archive: setup/test.zip Length Date Time Name --------- ---------- ----- ---- 6 2021-03-23 18:52 latters.txt 6 2021-03-23 18:52 numbers.txt --------- ------- 12 2 files Running "zipdetails" will gives this output $ zipdetails test.zip 0000 LOCAL HEADER #1 04034B50 0004 Extract Zip Spec 0A '1.0' 0005 Extract OS 00 'MS-DOS' 0006 General Purpose Flag 0000 0008 Compression Method 0000 'Stored' 000A Last Mod Time 5277983D 'Tue Mar 23 19:01:58 2021' 000E CRC 0F8A149C 0012 Compressed Length 00000006 0016 Uncompressed Length 00000006 001A Filename Length 000B 001C Extra Length 0000 001E Filename 'letters.txt' 0029 PAYLOAD abcde. 002F LOCAL HEADER #2 04034B50 0033 Extract Zip Spec 0A '1.0' 0034 Extract OS 00 'MS-DOS' 0035 General Purpose Flag 0000 0037 Compression Method 0000 'Stored' 0039 Last Mod Time 5277983D 'Tue Mar 23 19:01:58 2021' 003D CRC 261DAFE6 0041 Compressed Length 00000006 0045 Uncompressed Length 00000006 0049 Filename Length 000B 004B Extra Length 0000 004D Filename 'numbers.txt' 0058 PAYLOAD 12345. 005E CENTRAL HEADER #1 02014B50 0062 Created Zip Spec 1E '3.0' 0063 Created OS 03 'Unix' 0064 Extract Zip Spec 0A '1.0' 0065 Extract OS 00 'MS-DOS' 0066 General Purpose Flag 0000 0068 Compression Method 0000 'Stored' 006A Last Mod Time 5277983D 'Tue Mar 23 19:01:58 2021' 006E CRC 0F8A149C 0072 Compressed Length 00000006 0076 Uncompressed Length 00000006 007A Filename Length 000B 007C Extra Length 0000 007E Comment Length 0000 0080 Disk Start 0000 0082 Int File Attributes 0001 [Bit 0] 1 Text Data 0084 Ext File Attributes 81B40000 0088 Local Header Offset 00000000 008C Filename 'letters.txt' 0097 CENTRAL HEADER #2 02014B50 009B Created Zip Spec 1E '3.0' 009C Created OS 03 'Unix' 009D Extract Zip Spec 0A '1.0' 009E Extract OS 00 'MS-DOS' 009F General Purpose Flag 0000 00A1 Compression Method 0000 'Stored' 00A3 Last Mod Time 5277983D 'Tue Mar 23 19:01:58 2021' 00A7 CRC 261DAFE6 00AB Compressed Length 00000006 00AF Uncompressed Length 00000006 00B3 Filename Length 000B 00B5 Extra Length 0000 00B7 Comment Length 0000 00B9 Disk Start 0000 00BB Int File Attributes 0001 [Bit 0] 1 Text Data 00BD Ext File Attributes 81B40000 00C1 Local Header Offset 0000002F 00C5 Filename 'numbers.txt' 00D0 END CENTRAL HEADER 06054B50 00D4 Number of this disk 0000 00D6 Central Dir Disk no 0000 00D8 Entries in this disk 0002 00DA Total Entries 0002 00DC Size of Central Dir 00000072 00E0 Offset to Central Dir 0000005E 00E4 Comment Length 0000 Done Verbose Output If the "-v" option is present, column 1 is expanded to include • The offset from the start of the file in hex. • The length of the field in hex. • A hex dump of the bytes in field in the order they are stored in the zip file. Here is the same zip file dumped using the "zipdetails" "-v" option: $ zipdetails -v test.zip 0000 0004 50 4B 03 04 LOCAL HEADER #1 04034B50 0004 0001 0A Extract Zip Spec 0A '1.0' 0005 0001 00 Extract OS 00 'MS-DOS' 0006 0002 00 00 General Purpose Flag 0000 0008 0002 00 00 Compression Method 0000 'Stored' 000A 0004 3D 98 77 52 Last Mod Time 5277983D 'Tue Mar 23 19:01:58 2021' 000E 0004 9C 14 8A 0F CRC 0F8A149C 0012 0004 06 00 00 00 Compressed Length 00000006 0016 0004 06 00 00 00 Uncompressed Length 00000006 001A 0002 0B 00 Filename Length 000B 001C 0002 00 00 Extra Length 0000 001E 000B 6C 65 74 74 Filename 'letters.txt' 65 72 73 2E 74 78 74 0029 0006 61 62 63 64 PAYLOAD abcde. 65 0A 002F 0004 50 4B 03 04 LOCAL HEADER #2 04034B50 0033 0001 0A Extract Zip Spec 0A '1.0' 0034 0001 00 Extract OS 00 'MS-DOS' 0035 0002 00 00 General Purpose Flag 0000 0037 0002 00 00 Compression Method 0000 'Stored' 0039 0004 3D 98 77 52 Last Mod Time 5277983D 'Tue Mar 23 19:01:58 2021' 003D 0004 E6 AF 1D 26 CRC 261DAFE6 0041 0004 06 00 00 00 Compressed Length 00000006 0045 0004 06 00 00 00 Uncompressed Length 00000006 0049 0002 0B 00 Filename Length 000B 004B 0002 00 00 Extra Length 0000 004D 000B 6E 75 6D 62 Filename 'numbers.txt' 65 72 73 2E 74 78 74 0058 0006 31 32 33 34 PAYLOAD 12345. 35 0A 005E 0004 50 4B 01 02 CENTRAL HEADER #1 02014B50 0062 0001 1E Created Zip Spec 1E '3.0' 0063 0001 03 Created OS 03 'Unix' 0064 0001 0A Extract Zip Spec 0A '1.0' 0065 0001 00 Extract OS 00 'MS-DOS' 0066 0002 00 00 General Purpose Flag 0000 0068 0002 00 00 Compression Method 0000 'Stored' 006A 0004 3D 98 77 52 Last Mod Time 5277983D 'Tue Mar 23 19:01:58 2021' 006E 0004 9C 14 8A 0F CRC 0F8A149C 0072 0004 06 00 00 00 Compressed Length 00000006 0076 0004 06 00 00 00 Uncompressed Length 00000006 007A 0002 0B 00 Filename Length 000B 007C 0002 00 00 Extra Length 0000 007E 0002 00 00 Comment Length 0000 0080 0002 00 00 Disk Start 0000 0082 0002 01 00 Int File Attributes 0001 [Bit 0] 1 Text Data 0084 0004 00 00 B4 81 Ext File Attributes 81B40000 0088 0004 00 00 00 00 Local Header Offset 00000000 008C 000B 6C 65 74 74 Filename 'letters.txt' 65 72 73 2E 74 78 74 0097 0004 50 4B 01 02 CENTRAL HEADER #2 02014B50 009B 0001 1E Created Zip Spec 1E '3.0' 009C 0001 03 Created OS 03 'Unix' 009D 0001 0A Extract Zip Spec 0A '1.0' 009E 0001 00 Extract OS 00 'MS-DOS' 009F 0002 00 00 General Purpose Flag 0000 00A1 0002 00 00 Compression Method 0000 'Stored' 00A3 0004 3D 98 77 52 Last Mod Time 5277983D 'Tue Mar 23 19:01:58 2021' 00A7 0004 E6 AF 1D 26 CRC 261DAFE6 00AB 0004 06 00 00 00 Compressed Length 00000006 00AF 0004 06 00 00 00 Uncompressed Length 00000006 00B3 0002 0B 00 Filename Length 000B 00B5 0002 00 00 Extra Length 0000 00B7 0002 00 00 Comment Length 0000 00B9 0002 00 00 Disk Start 0000 00BB 0002 01 00 Int File Attributes 0001 [Bit 0] 1 Text Data 00BD 0004 00 00 B4 81 Ext File Attributes 81B40000 00C1 0004 2F 00 00 00 Local Header Offset 0000002F 00C5 000B 6E 75 6D 62 Filename 'numbers.txt' 65 72 73 2E 74 78 74 00D0 0004 50 4B 05 06 END CENTRAL HEADER 06054B50 00D4 0002 00 00 Number of this disk 0000 00D6 0002 00 00 Central Dir Disk no 0000 00D8 0002 02 00 Entries in this disk 0002 00DA 0002 02 00 Total Entries 0002 00DC 0004 72 00 00 00 Size of Central Dir 00000072 00E0 0004 5E 00 00 00 Offset to Central Dir 0000005E 00E4 0002 00 00 Comment Length 0000 Done LIMITATIONS The following zip file features are not supported by this program: • Multi-part archives. • The strong encryption features defined in the APPNOTE.TXT <http://www.pkware.com/documents/casestudies/APPNOTE.TXT> document. TODO Error handling is a work in progress. If the program encounters a problem reading a zip file it is likely to terminate with an unhelpful error message. SUPPORT General feedback/questions/bug reports should be sent to <https://github.com/pmqs/zipdetails/issues>. SEE ALSO The primary reference for Zip files is APPNOTE.TXT <http://www.pkware.com/documents/casestudies/APPNOTE.TXT>. An alternative reference is the Info-Zip appnote. This is available from <ftp://ftp.info-zip.org/pub/infozip/doc/> For details of WinZip AES encryption see AES Encryption Information: Encryption Specification AE-1 and AE-2 <https://www.winzip.com/win/es/aes_info.html>. The "zipinfo" program that comes with the info-zip distribution (<http://www.info-zip.org/>) can also display details of the structure of a zip file. AUTHOR Paul Marquess pmqs@cpan.org. COPYRIGHT Copyright (c) 2011-2022 Paul Marquess. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.38.2 2023-11-28 ZIPDETAILS(1)
| null |
env_parallel
|
env_parallel is a shell function that exports the current environment to GNU parallel. If the shell function is not loaded, a dummy script will be run instead that explains how to install the function. env_parallel is 100 ms slower at startup than pure GNU parallel, and takes up to 30% longer to start a job (typically 15 ms). Due to the problem with environment space (see below) you are recommended only to transfer the environment that you need. To help you do that, you can mark names that should not be transferred. This can be done with either --session or --record-env. # Record the "clean" environment (this only needs to be run once) env_parallel --record-env # Optionally edit ~/.parallel/ignored_vars (only needed once) # Define whatever you want to use myfunc() { myalias and functions $myvar work. $1.; } alias myalias='echo Aliases' myvar='and variables' # Use --env _ to only transfer the names not in the "empty" environment env_parallel --env _ -S localhost myfunc ::: Hooray Or: # Do --record-env into $PARALLEL_IGNORED_NAMES env_parallel --session # Define whatever you want to use myfunc() { myalias and functions $myvar work. $1.; } alias myalias='echo Aliases' myvar='and variables' # env_parallel will not export names in $PARALLEL_IGNORED_NAMES env_parallel -S localhost myfunc ::: Hooray # Optionally env_parallel --end-session In csh --session is not supported: # Record the "clean" environment - this only needs to be run once env_parallel --record-env # Optionally edit ~/.parallel/ignored_vars - only needed once # Define whatever you want to use alias myalias 'echo Aliases $myvar \!*.' set myvar='and variables' # Use --env _ to only transfer the names not in the "empty" environment env_parallel --env _ -S localhost myalias ::: work Environment space By default env_parallel will export all environment variables, arrays, aliases, functions and shell options (see details for the individual shells below). But this only works if the size of the current environment is smaller than the maximal length of a command and smaller than half of the max if running remotely. E.g. The max size of Bash's command is 128 KB, so env_parallel will fail if 'set | wc -c' is bigger than 128 KB. Technically the limit is in execve(1) which IPC::open3 uses. Bash completion functions are well-known for taking up well over 128 KB of environment space and the primary reason for causing env_parallel to fail. Instead you can use --env to specify which variables, arrays, aliases and functions to export as this will only export those with the given name. Or follow the recommended usage in shown in DESCRIPTION.
|
env_parallel - export environment to GNU parallel
|
env_parallel [--record-env|--session|--end-session] [options for GNU Parallel]
|
Same as GNU parallel in addition to these: --end-session Undo last --session --record-env Record all names currently defined to be ignored every time running env_parallel in the future. --session Ignore all names currently defined. Aliases, variables, arrays, and functions currently defined will not be transferred. But names defined after running parallel --session will be transferred. This is only valid in the running shell, and can be undone with parallel --end-session. You can run multiple --session inside each other: env_parallel --session var=not # var is transferred env_parallel -Slocalhost 'echo var is $var' ::: ignored env_parallel --session # var is not transferred env_parallel -Slocalhost 'echo var is $var' ::: ignored env_parallel --end-session # var is transferred again env_parallel -Slocalhost 'echo var is $var' ::: ignored SUPPORTED SHELLS Ash Installation Put this in $HOME/.profile: . env_parallel.ash E.g. by doing: echo '. env_parallel.ash' >> $HOME/.profile Supported use --env is supported to export only the variable, or alias with the given name. Multiple --envs can be given. --session is supported. aliases alias myecho='echo aliases' env_parallel myecho ::: work env_parallel -S server myecho ::: work env_parallel --env myecho myecho ::: work env_parallel --env myecho -S server myecho ::: work alias multiline='echo multiline echo aliases' env_parallel multiline ::: work env_parallel -S server multiline ::: work env_parallel --env multiline multiline ::: work env_parallel --env multiline -S server multiline ::: work functions ash cannot list defined functions - thus is not supported. variables myvar=variables env_parallel echo '$myvar' ::: work env_parallel -S server echo '$myvar' ::: work env_parallel --env myvar echo '$myvar' ::: work env_parallel --env myvar -S server echo '$myvar' ::: work arrays Arrays are not supported by Ash. Bash Installation Put this in $HOME/.bashrc: . env_parallel.bash E.g. by doing: echo '. env_parallel.bash' >> $HOME/.bashrc Supported use --env is supported to export only the variable, alias, function, or array with the given name. Multiple --envs can be given. --session is supported. aliases alias myecho='echo aliases' env_parallel myecho ::: work env_parallel -S server myecho ::: work env_parallel --env myecho myecho ::: work env_parallel --env myecho -S server myecho ::: work alias multiline='echo multiline echo aliases' env_parallel 'multiline {}; echo but only when followed by a newline' ::: work env_parallel -S server 'multiline {}; echo but only when followed by a newline' ::: work env_parallel --env multiline 'multiline {}; echo but only when followed by a newline' ::: work env_parallel --env multiline -S server 'multiline {}; echo but only when followed by a newline' ::: work functions myfunc() { echo functions $*; } env_parallel myfunc ::: work env_parallel -S server myfunc ::: work env_parallel --env myfunc myfunc ::: work env_parallel --env myfunc -S server myfunc ::: work variables myvar=variables env_parallel echo '$myvar' ::: work env_parallel -S server echo '$myvar' ::: work env_parallel --env myvar echo '$myvar' ::: work env_parallel --env myvar -S server echo '$myvar' ::: work arrays myarray=(arrays work, too) env_parallel -k echo '${myarray[{}]}' ::: 0 1 2 env_parallel -k -S server echo '${myarray[{}]}' ::: 0 1 2 env_parallel -k --env myarray echo '${myarray[{}]}' ::: 0 1 2 env_parallel -k --env myarray -S server \ echo '${myarray[{}]}' ::: 0 1 2 BUGS Due to a bug in Bash, aliases containing newlines must be followed by a newline in the command. Some systems are not affected by this bug, but will print a warning anyway. csh (alpha testing) env_parallel for csh breaks $PARALLEL, so do not use $PARALLEL. Installation Put this in $HOME/.cshrc: source `which env_parallel.csh` E.g. by doing: echo 'source `which env_parallel.csh`' >> $HOME/.cshrc Supported use --env is supported to export only the variable, alias, or array with the given name. Multiple --envs can be given. aliases alias myecho 'echo aliases' env_parallel myecho ::: work env_parallel -S server myecho ::: work env_parallel --env myecho myecho ::: work env_parallel --env myecho -S server myecho ::: work functions Not supported by csh. variables set myvar=variables env_parallel echo '$myvar' ::: work env_parallel -S server echo '$myvar' ::: work env_parallel --env myvar echo '$myvar' ::: work env_parallel --env myvar -S server echo '$myvar' ::: work arrays with no special chars set myarray=(arrays work, too) env_parallel -k echo \$'{myarray[{}]}' ::: 1 2 3 env_parallel -k -S server echo \$'{myarray[{}]}' ::: 1 2 3 env_parallel -k --env myarray echo \$'{myarray[{}]}' ::: 1 2 3 env_parallel -k --env myarray -S server \ echo \$'{myarray[{}]}' ::: 1 2 3 Dash Installation Put this in $HOME/.profile: . env_parallel.dash E.g. by doing: echo '. env_parallel.dash' >> $HOME/.profile Supported use --env is supported to export only the variable, or alias with the given name. Multiple --envs can be given. --session is supported. aliases alias myecho='echo aliases' env_parallel myecho ::: work env_parallel -S server myecho ::: work env_parallel --env myecho myecho ::: work env_parallel --env myecho -S server myecho ::: work alias multiline='echo multiline echo aliases' env_parallel multiline ::: work env_parallel -S server multiline ::: work env_parallel --env multiline multiline ::: work env_parallel --env multiline -S server multiline ::: work functions dash cannot list defined functions - thus is not supported. variables myvar=variables env_parallel echo '$myvar' ::: work env_parallel -S server echo '$myvar' ::: work env_parallel --env myvar echo '$myvar' ::: work env_parallel --env myvar -S server echo '$myvar' ::: work arrays dash does not support arrays. fish (alpha testing) Installation Put this in $HOME/.config/fish/config.fish: source (which env_parallel.fish) E.g. by doing: echo 'source (which env_parallel.fish)' \ >> $HOME/.config/fish/config.fish Supported use --env is supported to export only the variable, alias, function, or array with the given name. Multiple --envs can be given. --session is supported. aliases alias myecho 'echo aliases' env_parallel myecho ::: work env_parallel -S server myecho ::: work env_parallel --env myecho myecho ::: work env_parallel --env myecho -S server myecho ::: work functions function myfunc echo functions $argv end env_parallel myfunc ::: work env_parallel -S server myfunc ::: work env_parallel --env myfunc myfunc ::: work env_parallel --env myfunc -S server myfunc ::: work variables set myvar variables env_parallel echo '$myvar' ::: work env_parallel -S server echo '$myvar' ::: work env_parallel --env myvar echo '$myvar' ::: work env_parallel --env myvar -S server echo '$myvar' ::: work arrays Arrays normally work, but fail intermitently. set myarray arrays work, too env_parallel -k echo '$myarray[{}]' ::: 1 2 3 env_parallel -k -S server echo '$myarray[{}]' ::: 1 2 3 env_parallel -k --env myarray echo '$myarray[{}]' ::: 1 2 3 env_parallel -k --env myarray -S server \ echo '$myarray[{}]' ::: 1 2 3 ksh Installation Put this in $HOME/.kshrc: source env_parallel.ksh E.g. by doing: echo 'source env_parallel.ksh' >> $HOME/.kshrc Supported use --env is supported to export only the variable, alias, function, or array with the given name. Multiple --envs can be given. --session is supported. aliases alias myecho='echo aliases' env_parallel myecho ::: work env_parallel -S server myecho ::: work env_parallel --env myecho myecho ::: work env_parallel --env myecho -S server myecho ::: work alias multiline='echo multiline echo aliases' env_parallel multiline ::: work env_parallel -S server multiline ::: work env_parallel --env multiline multiline ::: work env_parallel --env multiline -S server multiline ::: work functions myfunc() { echo functions $*; } env_parallel myfunc ::: work env_parallel -S server myfunc ::: work env_parallel --env myfunc myfunc ::: work env_parallel --env myfunc -S server myfunc ::: work variables myvar=variables env_parallel echo '$myvar' ::: work env_parallel -S server echo '$myvar' ::: work env_parallel --env myvar echo '$myvar' ::: work env_parallel --env myvar -S server echo '$myvar' ::: work arrays myarray=(arrays work, too) env_parallel -k echo '${myarray[{}]}' ::: 0 1 2 env_parallel -k -S server echo '${myarray[{}]}' ::: 0 1 2 env_parallel -k --env myarray echo '${myarray[{}]}' ::: 0 1 2 env_parallel -k --env myarray -S server \ echo '${myarray[{}]}' ::: 0 1 2 mksh Installation Put this in $HOME/.mkshrc: source env_parallel.mksh E.g. by doing: echo 'source env_parallel.mksh' >> $HOME/.mkshrc Supported use --env is supported to export only the variable, alias, function, or array with the given name. Multiple --envs can be given. --session is supported. aliases alias myecho='echo aliases' env_parallel myecho ::: work env_parallel -S server myecho ::: work env_parallel --env myecho myecho ::: work env_parallel --env myecho -S server myecho ::: work alias multiline='echo multiline echo aliases' env_parallel multiline ::: work env_parallel -S server multiline ::: work env_parallel --env multiline multiline ::: work env_parallel --env multiline -S server multiline ::: work functions myfunc() { echo functions $*; } env_parallel myfunc ::: work env_parallel -S server myfunc ::: work env_parallel --env myfunc myfunc ::: work env_parallel --env myfunc -S server myfunc ::: work variables myvar=variables env_parallel echo '$myvar' ::: work env_parallel -S server echo '$myvar' ::: work env_parallel --env myvar echo '$myvar' ::: work env_parallel --env myvar -S server echo '$myvar' ::: work arrays myarray=(arrays work, too) env_parallel -k echo '${myarray[{}]}' ::: 0 1 2 env_parallel -k -S server echo '${myarray[{}]}' ::: 0 1 2 env_parallel -k --env myarray echo '${myarray[{}]}' ::: 0 1 2 env_parallel -k --env myarray -S server \ echo '${myarray[{}]}' ::: 0 1 2 pdksh Installation Put this in $HOME/.profile: source env_parallel.pdksh E.g. by doing: echo 'source env_parallel.pdksh' >> $HOME/.profile Supported use --env is supported to export only the variable, alias, function, or array with the given name. Multiple --envs can be given. --session is supported. aliases alias myecho="echo aliases"; env_parallel myecho ::: work; env_parallel -S server myecho ::: work; env_parallel --env myecho myecho ::: work; env_parallel --env myecho -S server myecho ::: work functions myfunc() { echo functions $*; }; env_parallel myfunc ::: work; env_parallel -S server myfunc ::: work; env_parallel --env myfunc myfunc ::: work; env_parallel --env myfunc -S server myfunc ::: work variables myvar=variables; env_parallel echo "\$myvar" ::: work; env_parallel -S server echo "\$myvar" ::: work; env_parallel --env myvar echo "\$myvar" ::: work; env_parallel --env myvar -S server echo "\$myvar" ::: work arrays myarray=(arrays work, too); env_parallel -k echo "\${myarray[{}]}" ::: 0 1 2; env_parallel -k -S server echo "\${myarray[{}]}" ::: 0 1 2; env_parallel -k --env myarray echo "\${myarray[{}]}" ::: 0 1 2; env_parallel -k --env myarray -S server \ echo "\${myarray[{}]}" ::: 0 1 2 sh Installation Put this in $HOME/.profile: . env_parallel.sh E.g. by doing: echo '. env_parallel.sh' >> $HOME/.profile Supported use --env is supported to export only the variable, or alias with the given name. Multiple --envs can be given. --session is supported. aliases sh does not support aliases. functions myfunc() { echo functions $*; } env_parallel myfunc ::: work env_parallel -S server myfunc ::: work env_parallel --env myfunc myfunc ::: work env_parallel --env myfunc -S server myfunc ::: work variables myvar=variables env_parallel echo '$myvar' ::: work env_parallel -S server echo '$myvar' ::: work env_parallel --env myvar echo '$myvar' ::: work env_parallel --env myvar -S server echo '$myvar' ::: work arrays sh does not support arrays. tcsh (alpha testing) env_parallel for tcsh breaks $PARALLEL, so do not use $PARALLEL. Installation Put this in $HOME/.tcshrc: source `which env_parallel.tcsh` E.g. by doing: echo 'source `which env_parallel.tcsh`' >> $HOME/.tcshrc Supported use --env is supported to export only the variable, alias, or array with the given name. Multiple --envs can be given. aliases alias myecho 'echo aliases' env_parallel myecho ::: work env_parallel -S server myecho ::: work env_parallel --env myecho myecho ::: work env_parallel --env myecho -S server myecho ::: work functions Not supported by tcsh. variables set myvar=variables env_parallel echo '$myvar' ::: work env_parallel -S server echo '$myvar' ::: work env_parallel --env myvar echo '$myvar' ::: work env_parallel --env myvar -S server echo '$myvar' ::: work arrays with no special chars set myarray=(arrays work, too) env_parallel -k echo \$'{myarray[{}]}' ::: 1 2 3 env_parallel -k -S server echo \$'{myarray[{}]}' ::: 1 2 3 env_parallel -k --env myarray echo \$'{myarray[{}]}' ::: 1 2 3 env_parallel -k --env myarray -S server \ echo \$'{myarray[{}]}' ::: 1 2 3 Zsh Installation Put this in $HOME/.zshrc: . env_parallel.zsh E.g. by doing: echo '. env_parallel.zsh' >> $HOME/.zshenv Supported use --env is supported to export only the variable, alias, function, or array with the given name. Multiple --envs can be given. --session is supported. aliases alias myecho='echo aliases' env_parallel myecho ::: work env_parallel -S server myecho ::: work env_parallel --env myecho myecho ::: work env_parallel --env myecho -S server myecho ::: work alias multiline='echo multiline echo aliases' env_parallel multiline ::: work env_parallel -S server multiline ::: work env_parallel --env multiline multiline ::: work env_parallel --env multiline -S server multiline ::: work functions myfunc() { echo functions $*; } env_parallel myfunc ::: work env_parallel -S server myfunc ::: work env_parallel --env myfunc myfunc ::: work env_parallel --env myfunc -S server myfunc ::: work variables myvar=variables env_parallel echo '$myvar' ::: work env_parallel -S server echo '$myvar' ::: work env_parallel --env myvar echo '$myvar' ::: work env_parallel --env myvar -S server echo '$myvar' ::: work arrays myarray=(arrays work, too) env_parallel -k echo '${myarray[{}]}' ::: 1 2 3 env_parallel -k -S server echo '${myarray[{}]}' ::: 1 2 3 env_parallel -k --env myarray echo '${myarray[{}]}' ::: 1 2 3 env_parallel -k --env myarray -S server \ echo '${myarray[{}]}' ::: 1 2 3 EXIT STATUS Same as GNU parallel. AUTHOR When using GNU env_parallel for a publication please cite: O. Tange (2018): GNU Parallel 2018, March 2018, ISBN 9781387509881, DOI: 10.5281/zenodo.1146014. This helps funding further development; and it won't cost you a cent. If you pay 10000 EUR you should feel free to use GNU Parallel without citing. Copyright (C) 2007-10-18 Ole Tange, http://ole.tange.dk Copyright (C) 2008-2010 Ole Tange, http://ole.tange.dk Copyright (C) 2010-2024 Ole Tange, http://ole.tange.dk and Free Software Foundation, Inc. LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or at your option any later version. This program 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 this program. If not, see <http://www.gnu.org/licenses/>. Documentation license I Permission is granted to copy, distribute and/or modify this documentation under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the file LICENSES/GFDL-1.3-or-later.txt. Documentation license II You are free: to Share to copy, distribute and transmit the work to Remix to adapt the work Under the following conditions: Attribution You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Share Alike If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. With the understanding that: Waiver Any of the above conditions can be waived if you get permission from the copyright holder. Public Domain Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. Other Rights In no way are any of the following rights affected by the license: • Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations; • The author's moral rights; • Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. Notice For any reuse or distribution, you must make clear to others the license terms of this work. A copy of the full license is included in the file as LICENCES/CC-BY-SA-4.0.txt DEPENDENCIES env_parallel uses GNU parallel. SEE ALSO parallel(1), ash(1), bash(1), csh(1), dash(1), fish(1), ksh(1), pdksh(1) tcsh(1), zsh(1). 20240722 2024-07-21 ENV_PARALLEL(1)
| null |
p7content
| null | null | null | null | null |
secmodtest
| null | null | null | null | null |
gnumfmt
|
Reformat NUMBER(s), or the numbers from standard input if none are specified. Mandatory arguments to long options are mandatory for short options too. --debug print warnings about invalid input -d, --delimiter=X use X instead of whitespace for field delimiter --field=FIELDS replace the numbers in these input fields (default=1); see FIELDS below --format=FORMAT use printf style floating-point FORMAT; see FORMAT below for details --from=UNIT auto-scale input numbers to UNITs; default is 'none'; see UNIT below --from-unit=N specify the input unit size (instead of the default 1) --grouping use locale-defined grouping of digits, e.g. 1,000,000 (which means it has no effect in the C/POSIX locale) --header[=N] print (without converting) the first N header lines; N defaults to 1 if not specified --invalid=MODE failure mode for invalid numbers: MODE can be: abort (default), fail, warn, ignore --padding=N pad the output to N characters; positive N will right-align; negative N will left-align; padding is ignored if the output is wider than N; the default is to automatically pad if a whitespace is found --round=METHOD use METHOD for rounding when scaling; METHOD can be: up, down, from-zero (default), towards-zero, nearest --suffix=SUFFIX add SUFFIX to output numbers, and accept optional SUFFIX in input numbers --to=UNIT auto-scale output numbers to UNITs; see UNIT below --to-unit=N the output unit size (instead of the default 1) -z, --zero-terminated line delimiter is NUL, not newline --help display this help and exit --version output version information and exit UNIT options: none no auto-scaling is done; suffixes will trigger an error auto accept optional single/two letter suffix: 1K = 1000, 1Ki = 1024, 1M = 1000000, 1Mi = 1048576, si accept optional single letter suffix: 1K = 1000, 1M = 1000000, ... iec accept optional single letter suffix: 1K = 1024, 1M = 1048576, ... iec-i accept optional two-letter suffix: 1Ki = 1024, 1Mi = 1048576, ... FIELDS supports cut(1) style field ranges: N N'th field, counted from 1 N- from N'th field, to end of line N-M from N'th to M'th field (inclusive) -M from first to M'th field (inclusive) - all fields Multiple fields/ranges can be separated with commas FORMAT must be suitable for printing one floating-point argument '%f'. Optional quote (%'f) will enable --grouping (if supported by current locale). Optional width value (%10f) will pad output. Optional zero (%010f) width will zero pad the number. Optional negative values (%-10f) will left align. Optional precision (%.1f) will override the input determined precision. Exit status is 0 if all input numbers were successfully converted. By default, numfmt will stop at the first conversion error with exit status 2. With --invalid='fail' a warning is printed for each conversion error and the exit status is 2. With --invalid='warn' each conversion error is diagnosed, but the exit status is 0. With --invalid='ignore' conversion errors are not diagnosed and the exit status is 0.
|
numfmt - Convert numbers from/to human-readable strings
|
numfmt [OPTION]... [NUMBER]...
| null |
$ numfmt --to=si 1000 -> "1.0K" $ numfmt --to=iec 2048 -> "2.0K" $ numfmt --to=iec-i 4096 -> "4.0Ki" $ echo 1K | numfmt --from=si -> "1000" $ echo 1K | numfmt --from=iec -> "1024" $ df -B1 | numfmt --header --field 2-4 --to=si $ ls -l | numfmt --header --field 5 --to=iec $ ls -lh | numfmt --header --field 5 --from=iec --padding=10 $ ls -lh | numfmt --header --field 5 --from=iec --format %10f AUTHOR Written by Assaf Gordon. 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/numfmt> or available locally via: info '(coreutils) numfmt invocation' GNU coreutils 9.3 April 2023 NUMFMT(1)
|
xgettext
|
Extract translatable strings from given input files. Mandatory arguments to long options are mandatory for short options too. Similarly for optional arguments. Input file location: INPUTFILE ... input files -f, --files-from=FILE get list of input files from FILE -D, --directory=DIRECTORY add DIRECTORY to list for input files search If input file is -, standard input is read. Output file location: -d, --default-domain=NAME use NAME.po for output (instead of messages.po) -o, --output=FILE write output to specified file -p, --output-dir=DIR output files will be placed in directory DIR If output file is -, output is written to standard output. Choice of input file language: -L, --language=NAME recognise the specified language (C, C++, ObjectiveC, PO, Shell, Python, Lisp, EmacsLisp, librep, Scheme, Smalltalk, Java, JavaProperties, C#, awk, YCP, Tcl, Perl, PHP, Ruby, GCC-source, NXStringTable, RST, RSJ, Glade, Lua, JavaScript, Vala, Desktop) -C, --c++ shorthand for --language=C++ By default the language is guessed depending on the input file name extension. Input file interpretation: --from-code=NAME encoding of input files (except for Python, Tcl, Glade) By default the input files are assumed to be in ASCII. Operation mode: -j, --join-existing join messages with existing file -x, --exclude-file=FILE.po entries from FILE.po are not extracted -cTAG, --add-comments=TAG place comment blocks starting with TAG and preceding keyword lines in output file -c, --add-comments place all comment blocks preceding keyword lines in output file --check=NAME perform syntax check on messages (ellipsis-unicode, space-ellipsis, quote-unicode, bullet-unicode) --sentence-end=TYPE type describing the end of sentence (single-space, which is the default, or double-space) Language specific options: -a, --extract-all extract all strings (only languages C, C++, ObjectiveC, Shell, Python, Lisp, EmacsLisp, librep, Scheme, Java, C#, awk, Tcl, Perl, PHP, GCC-source, Glade, Lua, JavaScript, Vala) -kWORD, --keyword=WORD look for WORD as an additional keyword -k, --keyword do not to use default keywords (only languages C, C++, ObjectiveC, Shell, Python, Lisp, EmacsLisp, librep, Scheme, Java, C#, awk, Tcl, Perl, PHP, GCC-source, Glade, Lua, JavaScript, Vala, Desktop) --flag=WORD:ARG:FLAG additional flag for strings inside the argument number ARG of keyword WORD (only languages C, C++, ObjectiveC, Shell, Python, Lisp, EmacsLisp, librep, Scheme, Java, C#, awk, YCP, Tcl, Perl, PHP, GCC-source, Lua, JavaScript, Vala) -T, --trigraphs understand ANSI C trigraphs for input (only languages C, C++, ObjectiveC) --its=FILE apply ITS rules from FILE (only XML based languages) --qt recognize Qt format strings (only language C++) --kde recognize KDE 4 format strings (only language C++) --boost recognize Boost format strings (only language C++) --debug more detailed formatstring recognition result Output details: --color use colors and other text attributes always --color=WHEN use colors and other text attributes if WHEN. WHEN may be 'always', 'never', 'auto', or 'html'. --style=STYLEFILE specify CSS style rule file for --color -e, --no-escape do not use C escapes in output (default) -E, --escape use C escapes in output, no extended chars --force-po write PO file even if empty -i, --indent write the .po file using indented style --no-location do not write '#: filename:line' lines -n, --add-location generate '#: filename:line' lines (default) --strict write out strict Uniforum conforming .po file --properties-output write out a Java .properties file --stringtable-output write out a NeXTstep/GNUstep .strings file --itstool write out itstool comments -w, --width=NUMBER set output page width --no-wrap do not break long message lines, longer than the output page width, into several lines -s, --sort-output generate sorted output (deprecated) -F, --sort-by-file sort output by file location --omit-header don't write header with 'msgid ""' entry --copyright-holder=STRING set copyright holder in output --foreign-user omit FSF copyright in output for foreign user --package-name=PACKAGE set package name in output --package-version=VERSION set package version in output --msgid-bugs-address=EMAIL@ADDRESS set report address for msgid bugs -m[STRING], --msgstr-prefix[=STRING] use STRING or "" as prefix for msgstr values -M[STRING], --msgstr-suffix[=STRING] use STRING or "" as suffix for msgstr values Informative output: -h, --help display this help and exit -V, --version output version information and exit -v, --verbose increase verbosity level 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 xgettext is maintained as a Texinfo manual. If the info and xgettext programs are properly installed at your site, the command info xgettext should give you access to the complete manual. GNU gettext-tools 0.22.5 February 2024 XGETTEXT(1)
|
xgettext - extract gettext strings from source
|
xgettext [OPTION] [INPUTFILE]...
| null | null |
probetest
| null | null | null | null | null |
vwebp
|
This manual page documents the vwebp command. vwebp decompresses a WebP file and displays it in a window using OpenGL.
|
vwebp - decompress a WebP file and display it in a window
|
vwebp [options] input_file.webp
|
-h Print usage summary. -version Print version number and exit. -noicc Don't use the ICC profile if present. -nofancy Don't use the fancy YUV420 upscaler. -nofilter Disable in-loop filtering. -dither strength Specify a dithering strength between 0 and 100. Dithering is a post-processing effect applied to chroma components in lossy compression. It helps by smoothing gradients and avoiding banding artifacts. Default: 50. -noalphadither By default, quantized transparency planes are dithered during decompression, to smooth the gradients. This flag will prevent this dithering. -usebgcolor Fill transparent areas with the bitstream's own background color instead of checkerboard only. Default is white for non-animated images. -mt Use multi-threading for decoding, if possible. -info Display image information on top of the decoded image. -- string Explicitly specify the input file. This option is useful if the input file starts with an '-' for instance. This option must appear last. Any other options afterward will be ignored. If the input file is "-", the data will be read from stdin instead of a file. KEYBOARD SHORTCUTS 'c' Toggle use of color profile. 'b' Toggle display of background color. 'i' Overlay file information. 'd' Disable blending and disposal process, for debugging purposes. 'q' / 'Q' / ESC Quit. BUGS Please report all bugs to the issue tracker: https://bugs.chromium.org/p/webp Patches welcome! See this page to get started: https://www.webmproject.org/code/contribute/submitting-patches/
|
vwebp picture.webp vwebp picture.webp -mt -dither 0 vwebp -- ---picture.webp AUTHORS vwebp is a part of libwebp and was written by the WebP team. The latest source tree is available at https://chromium.googlesource.com/webm/libwebp This manual page was written for the Debian project (and may be used by others). SEE ALSO dwebp(1) Please refer to https://developers.google.com/speed/webp/ for additional information. November 17, 2021 VWEBP(1)
|
stripe
| null | null | null | null | null |
hb-subset
| null | null | null | null | null |
cjxl
|
cjxl compresses an image or animation to the JPEG XL format. It is intended to spare users the trouble of determining a set of optimal parameters for each individual image. Instead, for a given target quality, it should provide consistent visual results across various kinds of images. The defaults have been chosen to be sensible, so that the following commands should give satisfactory results in most cases: cjxl input.png output.jxl cjxl input.jpg output.jxl cjxl input.gif output.jxl
|
cjxl - compress images to JPEG XL
|
cjxl [options...] input [output.jxl]
|
-h, --help Displays the options that cjxl supports. On its own, it will only show basic options. It can be combined with -v or -v -v to show increasingly advanced options as well. -v, --verbose Increases verbosity. Can be repeated to increase it further, and also applies to --help. -d distance, --distance=distance The preferred way to specify quality. It is specified in multiples of a just-noticeable difference. That is, -d 0 is mathematically lossless, -d 1 should be visually lossless, and higher distances yield denser and denser files with lower and lower fidelity. Lossy sources such as JPEG and GIF files are compressed losslessly by default, and in the case of JPEG files specifically, the original JPEG can then be reconstructed bit-for-bit. For lossless sources, -d 1 is the default. -q quality, --quality=quality Alternative way to indicate the desired quality. 100 is lossless and lower values yield smaller files. There is no lower bound to this quality parameter, but positive values should approximately match the quality setting of libjpeg. -e effort, --effort=effort Controls the amount of effort that goes into producing an “optimal” file in terms of quality/size. That is to say, all other parameters being equal, a higher effort should yield a file that is at least as dense and possibly denser, and with at least as high and possibly higher quality. Recognized effort settings, from fastest to slowest, are: • 1 or “lightning” • 2 or “thunder” • 3 or “falcon” • 4 or “cheetah” • 5 or “hare” • 6 or “wombat” • 7 or “squirrel” (default) • 8 or “kitten” • 9 or “tortoise”
|
# Compress a PNG file to a high-quality JPEG XL version. $ cjxl input.png output.jxl # Compress it at a slightly lower quality, appropriate for web use. $ cjxl -d 2 input.png output.jxl # Compress it losslessly. These are equivalent. $ cjxl -d 0 input.png lossless.jxl $ cjxl -q 100 input.png lossless.jxl # Compress a JPEG file losslessly. $ cjxl input.jpeg lossless-jpeg.jxl SEE ALSO djxl(1) 06/27/2024 CJXL(1)
|
ffeval
| null | null | null | null | null |
gio
| null | null | null | null | null |
hwloc-annotate
|
hwloc-annotate loads a topology from a XML file, adds some annotations, and export the resulting topology to another XML file. The input and output files may be the same. The annotation may be string info attributes. This is specified by the mode: info <name> <value> Specifies a new string info attribute whose name is name and value is value. subtype <subtype> Specifies that the subtype attribute of the object should now be subtype. If an empty string is given, the subtype is removed. size <size> Specifies the size of a cache or NUMA node. The value may be suffixed with kB, KiB, MB, MiB, GB, GiB, etc. misc <name> Specifies a new Misc object name. memattr <name> <flags> Register a new memory attribute whose name is name and flags is flags. location is ignored in this mode. Flags may be given as numeric values or as a comma-separated list of flag names that are passed to hwloc_memattr_register(). Those names may be substrings of actual flag names as long as a single one matches. For instance, a value of 1 (or higher) means that highest values are considered best for this attribute. memattr <name> <initiator> <value> Set the memory attribute (whose name is name) from initiator initiator (either an object or a CPU-set) to target NUMA node location to value value. If this attribute does not require specific initiators, initiator is ignored. Standard attribute names are Capacity, Locality, Bandwidth, and Latency. All existing attributes in the input topology may be listed with $ lstopo --memattrs -i input.xml cpukind <cpuset> <efficiency> <flags> [<infoname> <infovalue>] Specifies the kind of CPU for PUs listed in the given cpuset. location is ignored in this mode. efficiency is an abstracted efficiency value that will enforce ranking of kinds. It should be -1 if unknown. flags must be 0 for now. If infoname and infovalue are given and non-empty, they are added as info attributes to this kind of CPU. See the function hwloc_cpukinds_register() for details. distances <filename> [<flags>] Specifies new distances to be added to the topology using specifications in <filename>. The optional flags (0 unless specified) corresponds to the flags given to the function hwloc_distances_set(). location is ignored in this mode. The real first line of the pointed file must be a integer representing a distances kind as defined in hwloc/distances.h. The second line is the number of objects involved in the distances. The next lines contain one object each. The next lines contain one distance value each, or a single line may be given with a integer combination of format x*y or x*y*z. An optional line before all others may start with name= to specify the name of the distances structure if any. distances-transform <name> links Transform a bandwidth distances structure named <name> into links. See the documentation of HWLOC_DISTANCES_TRANSFORM_LINKS in hwloc/distances.h for details. distances-transform <name> merge-switch-ports When switches appear in the matrix as different ports, merge all of them into a single port for clarity. This currently only applies to the NVLinkBandwidth matrix between NVIDIA GPUs. See the documentation of HWLOC_DISTANCES_TRANSFORM_MERGE_SWITCH_PORTS in hwloc/distances.h for details. distances-transform <name> transitive-closure If objects are connected across a switch, apply a transitive- closure to report the bandwidth through that switch. This currently only applies to the NVLinkBandwidth matrix between NVIDIA GPUs. The bandwidth between all pairs of GPUs will be exposed instead of bandwidths between single GPUs and single NVSwitch ports. See the documentation of HWLOC_DISTANCES_TRANSFORM_TRANSITIVE_CLOSURE in hwloc/distances.h for details. distances-transform <name> remove-obj <obj> Remove the given object from the distances structure named <name>. distances-transform <name> replace-objs <oldtype> <newtype> Replace objects of type <oldtype> in distances structure named <name> with objects of type <newtype> with same locality. If <oldtype> or <newtype> are not object types, they are assumed subtypes of OS devices, e.g. "NVML" or "OpenCL". See the documentation of hwloc_get_obj_with_same_locality() in hwloc/helper.h for details. If <newtype> is "NULL", objects are removed from the distances structure. none No new annotation is added. This is useful when clearing existing attributes. Annotations may be added to one specific object in the topology, all of them, or all of a given type. This is specified by the location (see also EXAMPLES below). Multiple locations may be affected if they are specified between --. Objects may be specified as location tuples, as explained in hwloc(7). However hexadecimal bitmasks are not accepted since they may correspond to multiple objects. NOTE: The existing annotations may be listed with hwloc-info. NOTE: It is highly recommended that you read the hwloc(7) overview page before reading this man page. Most of the concepts described in hwloc(7) directly apply to the hwloc-annotate utility.
|
hwloc-annotate - Modify attributes in a XML topology
|
hwloc-annotate [options] <input.xml> <output.xml> -- <location1> <location2> ... -- <mode> <annotation> hwloc-annotate [options] <input.xml> <output.xml> <location> <mode> <annotation> Note that hwloc(7) provides a detailed explanation of the hwloc system and of valid <location> formats; it should be read before reading this man page.
|
--ri Remove all info attributes that exist with the same name before adding the new one. This option is only accepted in "info" mode. If the info value is omitted, existing infos are replaced with nothing. --ci Clear the existing info attributes in the target objects before annotating. If no new annotation has to be added after clearing, mode should be set to none. --cu Clear the existing userdata from the target objects. If nothing else has to be performed after clearing, mode should be set to none. --cd Clear the existing distances from the topology. If nothing else has to be performed after clearing, mode should be set to none. --version Report version and exit. -h --help Display help message and exit.
|
hwloc-annotate's operation is best described through several examples. Add an info attribute to all Core and PU objects: $ hwloc-annotate input.xml output.xml -- Core:all PU:all -- info infoname infovalue Only add to all Core objects: $ hwloc-annotate input.xml output.xml Core:all info infoname infovalue Add a Misc object named "foobar" under the root object of the topology and modify the input XML directly: $ hwloc-annotate file.xml file.xml root misc foobar Add an info attribute to OS device #2 and #3: $ hwloc-annotate input.xml output.xml os:2-3 info infoname infovalue Change package objects to green with red text in the lstopo graphical output: $ hwloc-annotate topo.xml topo.xml package:all info lstopoStyle "Background=#00ff00;Text=#ff0000" $ lstopo -i topo.xml Set the memory attribute latency to 123 nanoseconds from the PUs in the first package to the first NUMA node: $ hwloc-annotate topo.xml topo.xml numanode:0 memattr Latency $(hwloc-calc package:0) 123 Register a memory attribute MyApplicationPerformance (with flags specifying that it requires an initiator and reports higher values first) and set its value for initiator CPU-set 0x11 to NUMA node #2 to 2345: $ hwloc-annotate topo.xml topo.xml ignored memattr MyApplicationPerformance need_init,higher $ hwloc-annotate topo.xml topo.xml numanode:2 memattr MyApplicationPerformance 0x11 2345 To clarify that NUMA node #0 is DDR while NUMA node #1 is HBM: $ hwloc-annotate topo.xml topo.xml numa:0 subtype DDR $ hwloc-annotate topo.xml topo.xml numa:1 subtype HBM Specify that PU 0-3 and PU 4-7 are of different kinds, and the latter is more efficient: $ hwloc-annotate topo.xml topo.xml dummy cpukind 0x0f 0 0 CoreType Small $ hwloc-annotate topo.xml topo.xml dummy cpukind 0xf0 1 0 CoreType Big Replace NUMA nodes with Packages in the NUMALatency distances matrix, when they have the exact same locality. $ hwloc-annotate topo.xml topo.xml -- dummy -- distances-transform NUMALatency replace-objs numanode packages Remove NUMA node #3 from the NUMALatency distances matrix: $ hwloc-annotate topo.xml topo.xml -- dummy -- distances-transform NUMALatency remove-obj numa:3 Merge all NVSwitch ports bandwidth information into a single port in the NVLinkBandwidth matrix: $ hwloc-annotate topo.xml topo.xml -- dummy -- distances-transform NVLinkBandwidth merge-switch-ports Apply a transitive closure to get inter-GPU bandwidth across NVSwitches in the NVLinkBandwidth matrix: $ hwloc-annotate topo.xml topo.xml -- dummy -- distances-transform NVLinkBandwidth transitive-closure RETURN VALUE Upon successful execution, hwloc-annotate generates the output topology. The return value is 0. hwloc-annotate will return nonzero if any kind of error occurs, such as (but not limited to) failure to parse the command line. SEE ALSO hwloc(7), lstopo(1), hwloc-info(1) 2.10.0 December 4, 2023 HWLOC-ANNOTATE(1)
|
mysqlslap
|
mysqlslap is a diagnostic program designed to emulate client load for a MySQL server and to report the timing of each stage. It works as if multiple clients are accessing the server. Invoke mysqlslap like this: mysqlslap [options] Some options such as --create or --query enable you to specify a string containing an SQL statement or a file containing statements. If you specify a file, by default it must contain one statement per line. (That is, the implicit statement delimiter is the newline character.) Use the --delimiter option to specify a different delimiter, which enables you to specify statements that span multiple lines or place multiple statements on a single line. You cannot include comments in a file; mysqlslap does not understand them. mysqlslap runs in three stages: 1. Create schema, table, and optionally any stored programs or data to use for the test. This stage uses a single client connection. 2. Run the load test. This stage can use many client connections. 3. Clean up (disconnect, drop table if specified). This stage uses a single client connection. Examples: Supply your own create and query SQL statements, with 50 clients querying and 200 selects for each (enter the command on a single line): mysqlslap --delimiter=";" --create="CREATE TABLE a (b int);INSERT INTO a VALUES (23)" --query="SELECT * FROM a" --concurrency=50 --iterations=200 Let mysqlslap build the query SQL statement with a table of two INT columns and three VARCHAR columns. Use five clients querying 20 times each. Do not create the table or insert the data (that is, use the previous test's schema and data): mysqlslap --concurrency=5 --iterations=20 --number-int-cols=2 --number-char-cols=3 --auto-generate-sql Tell the program to load the create, insert, and query SQL statements from the specified files, where the create.sql file has multiple table creation statements delimited by ';' and multiple insert statements delimited by ';'. The --query file should contain multiple queries delimited by ';'. Run all the load statements, then run all the queries in the query file with five clients (five times each): mysqlslap --concurrency=5 --iterations=5 --query=query.sql --create=create.sql --delimiter=";" mysqlslap supports the following options, which can be specified on the command line or in the [mysqlslap] 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-generate-sql, -a ┌────────────────────┬─────────────────────┐ │Command-Line Format │ --auto-generate-sql │ ├────────────────────┼─────────────────────┤ │Type │ Boolean │ ├────────────────────┼─────────────────────┤ │Default Value │ FALSE │ └────────────────────┴─────────────────────┘ Generate SQL statements automatically when they are not supplied in files or using command options. • --auto-generate-sql-add-autoincrement ┌────────────────────┬───────────────────────────────────────┐ │Command-Line Format │ --auto-generate-sql-add-autoincrement │ ├────────────────────┼───────────────────────────────────────┤ │Type │ Boolean │ ├────────────────────┼───────────────────────────────────────┤ │Default Value │ FALSE │ └────────────────────┴───────────────────────────────────────┘ Add an AUTO_INCREMENT column to automatically generated tables. • --auto-generate-sql-execute-number=N ┌────────────────────┬──────────────────────────────────────┐ │Command-Line Format │ --auto-generate-sql-execute-number=# │ ├────────────────────┼──────────────────────────────────────┤ │Type │ Numeric │ └────────────────────┴──────────────────────────────────────┘ Specify how many queries to generate automatically. • --auto-generate-sql-guid-primary ┌────────────────────┬──────────────────────────────────┐ │Command-Line Format │ --auto-generate-sql-guid-primary │ ├────────────────────┼──────────────────────────────────┤ │Type │ Boolean │ ├────────────────────┼──────────────────────────────────┤ │Default Value │ FALSE │ └────────────────────┴──────────────────────────────────┘ Add a GUID-based primary key to automatically generated tables. • --auto-generate-sql-load-type=type ┌────────────────────┬────────────────────────────────────┐ │Command-Line Format │ --auto-generate-sql-load-type=type │ ├────────────────────┼────────────────────────────────────┤ │Type │ Enumeration │ ├────────────────────┼────────────────────────────────────┤ │Default Value │ mixed │ ├────────────────────┼────────────────────────────────────┤ │Valid Values │ read write key update mixed │ └────────────────────┴────────────────────────────────────┘ Specify the test load type. The permissible values are read (scan tables), write (insert into tables), key (read primary keys), update (update primary keys), or mixed (half inserts, half scanning selects). The default is mixed. • --auto-generate-sql-secondary-indexes=N ┌────────────────────┬─────────────────────────────────────────┐ │Command-Line Format │ --auto-generate-sql-secondary-indexes=# │ ├────────────────────┼─────────────────────────────────────────┤ │Type │ Numeric │ ├────────────────────┼─────────────────────────────────────────┤ │Default Value │ 0 │ └────────────────────┴─────────────────────────────────────────┘ Specify how many secondary indexes to add to automatically generated tables. By default, none are added. • --auto-generate-sql-unique-query-number=N ┌────────────────────┬───────────────────────────────────────────┐ │Command-Line Format │ --auto-generate-sql-unique-query-number=# │ ├────────────────────┼───────────────────────────────────────────┤ │Type │ Numeric │ ├────────────────────┼───────────────────────────────────────────┤ │Default Value │ 10 │ └────────────────────┴───────────────────────────────────────────┘ How many different queries to generate for automatic tests. For example, if you run a key test that performs 1000 selects, you can use this option with a value of 1000 to run 1000 unique queries, or with a value of 50 to perform 50 different selects. The default is 10. • --auto-generate-sql-unique-write-number=N ┌────────────────────┬───────────────────────────────────────────┐ │Command-Line Format │ --auto-generate-sql-unique-write-number=# │ ├────────────────────┼───────────────────────────────────────────┤ │Type │ Numeric │ ├────────────────────┼───────────────────────────────────────────┤ │Default Value │ 10 │ └────────────────────┴───────────────────────────────────────────┘ How many different queries to generate for --auto-generate-sql-write-number. The default is 10. • --auto-generate-sql-write-number=N ┌────────────────────┬────────────────────────────────────┐ │Command-Line Format │ --auto-generate-sql-write-number=# │ ├────────────────────┼────────────────────────────────────┤ │Type │ Numeric │ ├────────────────────┼────────────────────────────────────┤ │Default Value │ 100 │ └────────────────────┴────────────────────────────────────┘ How many row inserts to perform. The default is 100. • --commit=N ┌────────────────────┬────────────┐ │Command-Line Format │ --commit=# │ ├────────────────────┼────────────┤ │Type │ Numeric │ ├────────────────────┼────────────┤ │Default Value │ 0 │ └────────────────────┴────────────┘ How many statements to execute before committing. The default is 0 (no commits are done). • --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”. • --concurrency=N, -c N ┌────────────────────┬─────────────────┐ │Command-Line Format │ --concurrency=# │ ├────────────────────┼─────────────────┤ │Type │ Numeric │ └────────────────────┴─────────────────┘ The number of parallel clients to simulate. • --create=value ┌────────────────────┬────────────────┐ │Command-Line Format │ --create=value │ ├────────────────────┼────────────────┤ │Type │ String │ └────────────────────┴────────────────┘ The file or string containing the statement to use for creating the table. • --create-schema=value ┌────────────────────┬───────────────────────┐ │Command-Line Format │ --create-schema=value │ ├────────────────────┼───────────────────────┤ │Type │ String │ └────────────────────┴───────────────────────┘ The schema in which to run the tests. Note If the --auto-generate-sql option is also given, mysqlslap drops the schema at the end of the test run. To avoid this, use the --no-drop option as well. • --csv[=file_name] ┌────────────────────┬──────────────┐ │Command-Line Format │ --csv=[file] │ ├────────────────────┼──────────────┤ │Type │ File name │ └────────────────────┴──────────────┘ Generate output in comma-separated values format. The output goes to the named file, or to the standard output if no file is given. • --debug[=debug_options], -# [debug_options] ┌────────────────────┬────────────────────────────┐ │Command-Line Format │ --debug[=debug_options] │ ├────────────────────┼────────────────────────────┤ │Type │ String │ ├────────────────────┼────────────────────────────┤ │Default Value │ d:t:o,/tmp/mysqlslap.trace │ └────────────────────┴────────────────────────────┘ Write a debugging log. A typical debug_options string is d:t:o,file_name. The default is d:t:o,/tmp/mysqlslap.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”. • --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, mysqlslap normally reads the [client] and [mysqlslap] groups. If this option is given as --defaults-group-suffix=_other, mysqlslap also reads the [client_other] and [mysqlslap_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, -F str ┌────────────────────┬─────────────────┐ │Command-Line Format │ --delimiter=str │ ├────────────────────┼─────────────────┤ │Type │ String │ └────────────────────┴─────────────────┘ The delimiter to use in SQL statements supplied in files or using command options. • --detach=N ┌────────────────────┬────────────┐ │Command-Line Format │ --detach=# │ ├────────────────────┼────────────┤ │Type │ Numeric │ ├────────────────────┼────────────┤ │Default Value │ 0 │ └────────────────────┴────────────┘ Detach (close and reopen) each connection after each N statements. The default is 0 (connections are not detached). • --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”.) • --engine=engine_name, -e engine_name ┌────────────────────┬──────────────────────┐ │Command-Line Format │ --engine=engine_name │ ├────────────────────┼──────────────────────┤ │Type │ String │ └────────────────────┴──────────────────────┘ The storage engine to use for creating tables. • --get-server-public-key ┌────────────────────┬─────────────────────────┐ │Command-Line Format │ --get-server-public-key │ ├────────────────────┼─────────────────────────┤ │Type │ Boolean │ └────────────────────┴─────────────────────────┘ Request from the server the RSA public key that it uses for key pair-based password exchange. This option applies to clients that connect to the server using an account that authenticates with the caching_sha2_password authentication plugin. For connections by such accounts, the server does not send the public key to the client unless requested. The option is ignored for accounts that do not authenticate with that plugin. It is also ignored if RSA-based password exchange is not needed, 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”. • --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. • --iterations=N, -i N ┌────────────────────┬────────────────┐ │Command-Line Format │ --iterations=# │ ├────────────────────┼────────────────┤ │Type │ Numeric │ └────────────────────┴────────────────┘ The number of times to run the tests. • --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”. • --no-drop ┌────────────────────┬───────────┐ │Command-Line Format │ --no-drop │ ├────────────────────┼───────────┤ │Type │ Boolean │ ├────────────────────┼───────────┤ │Default Value │ FALSE │ └────────────────────┴───────────┘ Prevent mysqlslap from dropping any schema it creates during the test run. • --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”. • --number-char-cols=N, -x N ┌────────────────────┬──────────────────────┐ │Command-Line Format │ --number-char-cols=# │ ├────────────────────┼──────────────────────┤ │Type │ Numeric │ └────────────────────┴──────────────────────┘ The number of VARCHAR columns to use if --auto-generate-sql is specified. • --number-int-cols=N, -y N ┌────────────────────┬─────────────────────┐ │Command-Line Format │ --number-int-cols=# │ ├────────────────────┼─────────────────────┤ │Type │ Numeric │ └────────────────────┴─────────────────────┘ The number of INT columns to use if --auto-generate-sql is specified. • --number-of-queries=N ┌────────────────────┬───────────────────────┐ │Command-Line Format │ --number-of-queries=# │ ├────────────────────┼───────────────────────┤ │Type │ Numeric │ └────────────────────┴───────────────────────┘ Limit each client to approximately this many queries. Query counting takes into account the statement delimiter. For example, if you invoke mysqlslap as follows, the ; delimiter is recognized so that each instance of the query string counts as two queries. As a result, 5 rows (not 10) are inserted. mysqlslap --delimiter=";" --number-of-queries=10 --query="use test;insert into t values(null)" • --only-print ┌────────────────────┬──────────────┐ │Command-Line Format │ --only-print │ ├────────────────────┼──────────────┤ │Type │ Boolean │ ├────────────────────┼──────────────┤ │Default Value │ FALSE │ └────────────────────┴──────────────┘ Do not connect to databases. mysqlslap only prints what it would have done. • --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, mysqlslap 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 mysqlslap 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, mysqlslap 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 mysqlslap 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-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 mysqlslap 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. • --post-query=value ┌────────────────────┬────────────────────┐ │Command-Line Format │ --post-query=value │ ├────────────────────┼────────────────────┤ │Type │ String │ └────────────────────┴────────────────────┘ The file or string containing the statement to execute after the tests have completed. This execution is not counted for timing purposes. • --post-system=str ┌────────────────────┬───────────────────┐ │Command-Line Format │ --post-system=str │ ├────────────────────┼───────────────────┤ │Type │ String │ └────────────────────┴───────────────────┘ The string to execute using system() after the tests have completed. This execution is not counted for timing purposes. • --pre-query=value ┌────────────────────┬───────────────────┐ │Command-Line Format │ --pre-query=value │ ├────────────────────┼───────────────────┤ │Type │ String │ └────────────────────┴───────────────────┘ The file or string containing the statement to execute before running the tests. This execution is not counted for timing purposes. • --pre-system=str ┌────────────────────┬──────────────────┐ │Command-Line Format │ --pre-system=str │ ├────────────────────┼──────────────────┤ │Type │ String │ └────────────────────┴──────────────────┘ The string to execute using system() before running the tests. This execution is not counted for timing purposes. • --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”. • --query=value, -q value ┌────────────────────┬───────────────┐ │Command-Line Format │ --query=value │ ├────────────────────┼───────────────┤ │Type │ String │ └────────────────────┴───────────────┘ The file or string containing the SELECT statement to use for retrieving data. • --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. • --silent, -s ┌────────────────────┬──────────┐ │Command-Line Format │ --silent │ └────────────────────┴──────────┘ Silent mode. No output. • --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. • --sql-mode=mode ┌────────────────────┬─────────────────┐ │Command-Line Format │ --sql-mode=mode │ ├────────────────────┼─────────────────┤ │Type │ String │ └────────────────────┴─────────────────┘ Set the SQL mode for the client session. • --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”. • --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. Print more information about what the program does. This option can be used multiple times to increase the amount of information. • --version, -V ┌────────────────────┬───────────┐ │Command-Line Format │ --version │ └────────────────────┴───────────┘ Display version information and exit. • --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”. 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 MYSQLSLAP(1)
|
mysqlslap - a load emulation client
|
mysqlslap [options]
| null | null |
gbasenc
|
basenc encode or decode FILE, or standard input, to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. --base64 same as 'base64' program (RFC4648 section 4) --base64url file- and url-safe base64 (RFC4648 section 5) --base32 same as 'base32' program (RFC4648 section 6) --base32hex extended hex alphabet base32 (RFC4648 section 7) --base16 hex encoding (RFC4648 section 8) --base2msbf bit string with most significant bit (msb) first --base2lsbf bit string with least significant bit (lsb) first -d, --decode decode data -i, --ignore-garbage when decoding, ignore non-alphabet characters -w, --wrap=COLS wrap encoded lines after COLS character (default 76). Use 0 to disable line wrapping --z85 ascii85-like encoding (ZeroMQ spec:32/Z85); when encoding, input length must be a multiple of 4; when decoding, input length must be a multiple of 5 --help display this help and exit --version output version information and exit When decoding, the input may contain newlines in addition to the bytes of the formal alphabet. Use --ignore-garbage to attempt to recover from any other non-alphabet bytes in the encoded stream. ENCODINGS EXAMPLES $ printf '\376\117\202' | basenc --base64 /k+C $ printf '\376\117\202' | basenc --base64url _k-C $ printf '\376\117\202' | basenc --base32 7ZHYE=== $ printf '\376\117\202' | basenc --base32hex VP7O4=== $ printf '\376\117\202' | basenc --base16 FE4F82 $ printf '\376\117\202' | basenc --base2lsbf 011111111111001001000001 $ printf '\376\117\202' | basenc --base2msbf 111111100100111110000010 $ printf '\376\117\202\000' | basenc --z85 @.FaC AUTHOR Written by Simon Josefsson and Assaf Gordon. 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/basenc> or available locally via: info '(coreutils) basenc invocation' GNU coreutils 9.3 April 2023 BASENC(1)
|
basenc - Encode/decode data and print to standard output
|
basenc [OPTION]... [FILE]
| null | null |
pyflakes
| null | null | null | null | null |
protoc-gen-upbdefs
| null | null | null | null | null |
gpgparsemail
|
The gpgparsemail is a utility currently only useful for debugging. Run it with --help for usage information. GnuPG 2.4.5 2024-03-04 GPGPARSEMAIL(1)
|
gpgparsemail - Parse a mail message into an annotated format
|
gpgparsemail [options] [file]
| null | null |
vterm-ctrl
| null | null | null | null | null |
fc-scan
| null | null | null | null | null |
gettextize
|
Prepares a source package to use gettext.
|
gettextize - install or upgrade gettext infrastructure
|
gettextize [OPTION]... [package-dir]
|
--help print this help and exit --version print version information and exit -f, --force force writing of new files even if old exist --po-dir=DIR specify directory with PO files --no-changelog don't update or create ChangeLog files --symlink make symbolic links instead of copying files -n, --dry-run print modifications but don't perform them 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 gettextize is maintained as a Texinfo manual. If the info and gettextize programs are properly installed at your site, the command info gettextize should give you access to the complete manual. GNU gettext-tools 0.22.5 February 2024 GETTEXTIZE(1)
| null |
lsm2bin
| null | null | null | null | null |
ssimulacra_main
| null | null | null | null | null |
msguniq
|
Unifies duplicate translations in a translation catalog. Finds duplicate translations of the same message ID. Such duplicates are invalid input for other programs like msgfmt, msgmerge or msgcat. By default, duplicates are merged together. When using the --repeated option, only duplicates are output, and all other messages are discarded. Comments and extracted comments will be cumulated, except that if --use-first is specified, they will be taken from the first translation. File positions will be cumulated. When using the --unique option, duplicates are discarded. Mandatory arguments to long options are mandatory for short options too. Input file location: INPUTFILE input PO file -D, --directory=DIRECTORY add DIRECTORY to list for input files search If no input file is given or if it is -, standard input is read. Output file location: -o, --output-file=FILE write output to specified file The results are written to standard output if no output file is specified or if it is -. Message selection: -d, --repeated print only duplicates -u, --unique print only unique messages, discard duplicates Input file syntax: -P, --properties-input input file is in Java .properties syntax --stringtable-input input file is in NeXTstep/GNUstep .strings syntax Output details: -t, --to-code=NAME encoding for output --use-first use first available translation for each message, don't merge several translations --color use colors and other text attributes always --color=WHEN use colors and other text attributes if WHEN. WHEN may be 'always', 'never', 'auto', or 'html'. --style=STYLEFILE specify CSS style rule file for --color -e, --no-escape do not use C escapes in output (default) -E, --escape use C escapes in output, no extended chars --force-po write PO file even if empty -i, --indent write the .po file using indented style --no-location do not write '#: filename:line' lines -n, --add-location generate '#: filename:line' lines (default) --strict write out strict Uniforum conforming .po file -p, --properties-output write out a Java .properties file --stringtable-output write out a NeXTstep/GNUstep .strings file -w, --width=NUMBER set output page width --no-wrap do not break long message lines, longer than the output page width, into several lines -s, --sort-output generate sorted output -F, --sort-by-file sort output by file location Informative output: -h, --help display this help and exit -V, --version output version information and exit AUTHOR Written by Bruno Haible. 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 © 2001-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 msguniq is maintained as a Texinfo manual. If the info and msguniq programs are properly installed at your site, the command info msguniq should give you access to the complete manual. GNU gettext-tools 0.22.5 February 2024 MSGUNIQ(1)
|
msguniq - unify duplicate translations in message catalog
|
msguniq [OPTION] [INPUTFILE]
| null | null |
env_parallel.mksh
| null | null | null | null | null |
gdate
|
Display date and time in the given FORMAT. With -s, or with [MMDDhhmm[[CC]YY][.ss]], set the date and time. Mandatory arguments to long options are mandatory for short options too. -d, --date=STRING display time described by STRING, not 'now' --debug annotate the parsed date, and warn about questionable usage to stderr -f, --file=DATEFILE like --date; once for each line of DATEFILE -I[FMT], --iso-8601[=FMT] output date/time in ISO 8601 format. FMT='date' for date only (the default), 'hours', 'minutes', 'seconds', or 'ns' for date and time to the indicated precision. Example: 2006-08-14T02:34:56-06:00 --resolution output the available resolution of timestamps Example: 0.000000001 -R, --rfc-email output date and time in RFC 5322 format. Example: Mon, 14 Aug 2006 02:34:56 -0600 --rfc-3339=FMT output date/time in RFC 3339 format. FMT='date', 'seconds', or 'ns' for date and time to the indicated precision. Example: 2006-08-14 02:34:56-06:00 -r, --reference=FILE display the last modification time of FILE -s, --set=STRING set time described by STRING -u, --utc, --universal print or set Coordinated Universal Time (UTC) --help display this help and exit --version output version information and exit All options that specify the date to display are mutually exclusive. I.e.: --date, --file, --reference, --resolution. FORMAT controls the output. Interpreted sequences are: %% a literal % %a locale's abbreviated weekday name (e.g., Sun) %A locale's full weekday name (e.g., Sunday) %b locale's abbreviated month name (e.g., Jan) %B locale's full month name (e.g., January) %c locale's date and time (e.g., Thu Mar 3 23:05:25 2005) %C century; like %Y, except omit last two digits (e.g., 20) %d day of month (e.g., 01) %D date; same as %m/%d/%y %e day of month, space padded; same as %_d %F full date; like %+4Y-%m-%d %g last two digits of year of ISO week number (see %G) %G year of ISO week number (see %V); normally useful only with %V %h same as %b %H hour (00..23) %I hour (01..12) %j day of year (001..366) %k hour, space padded ( 0..23); same as %_H %l hour, space padded ( 1..12); same as %_I %m month (01..12) %M minute (00..59) %n a newline %N nanoseconds (000000000..999999999) %p locale's equivalent of either AM or PM; blank if not known %P like %p, but lower case %q quarter of year (1..4) %r locale's 12-hour clock time (e.g., 11:11:04 PM) %R 24-hour hour and minute; same as %H:%M %s seconds since the Epoch (1970-01-01 00:00 UTC) %S second (00..60) %t a tab %T time; same as %H:%M:%S %u day of week (1..7); 1 is Monday %U week number of year, with Sunday as first day of week (00..53) %V ISO week number, with Monday as first day of week (01..53) %w day of week (0..6); 0 is Sunday %W week number of year, with Monday as first day of week (00..53) %x locale's date representation (e.g., 12/31/99) %X locale's time representation (e.g., 23:13:48) %y last two digits of year (00..99) %Y year %z +hhmm numeric time zone (e.g., -0400) %:z +hh:mm numeric time zone (e.g., -04:00) %::z +hh:mm:ss numeric time zone (e.g., -04:00:00) %:::z numeric time zone with : to necessary precision (e.g., -04, +05:30) %Z alphabetic time zone abbreviation (e.g., EDT) By default, date pads numeric fields with zeroes. The following optional flags may follow '%': - (hyphen) do not pad the field _ (underscore) pad with spaces 0 (zero) pad with zeros + pad with zeros, and put '+' before future years with >4 digits ^ use upper case if possible # use opposite case if possible After any flags comes an optional field width, as a decimal number; then an optional modifier, which is either E to use the locale's alternate representations if available, or O to use the locale's alternate numeric symbols if available.
|
date - print or set the system date and time
|
date [OPTION]... [+FORMAT] date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
| null |
Convert seconds since the Epoch (1970-01-01 UTC) to a date $ date --date='@2147483647' Show the time on the west coast of the US (use tzselect(1) to find TZ) $ TZ='America/Los_Angeles' date Show the local time for 9AM next Friday on the west coast of the US $ date --date='TZ="America/Los_Angeles" 09:00 next Fri' DATE STRING The --date=STRING is a mostly free format human readable date string such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or even "next Thursday". A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers. An empty string indicates the beginning of the day. The date string format is more complex than is easily documented here but is fully described in the info documentation. 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 Full documentation <https://www.gnu.org/software/coreutils/date> or available locally via: info '(coreutils) date invocation' GNU coreutils 9.3 April 2023 DATE(1)
|
sql
|
GNU sql aims to give a simple, unified interface for accessing databases through all the different databases' command line clients. So far the focus has been on giving a common way to specify login information (protocol, username, password, hostname, and port number), size (database and table size), and running queries. The database is addressed using a DBURL. If commands are left out you will get that database's interactive shell. GNU sql is often used in combination with GNU parallel. dburl A DBURL has the following syntax: [sql:]vendor:// [[user][:password]@][host][:port]/[database][?sqlquery] See the section DBURL below. commands The SQL commands to run. Each argument will have a newline appended. Example: "SELECT * FROM foo;" "SELECT * FROM bar;" If the arguments contain '\n' or '\x0a' this will be replaced with a newline: Example: "SELECT * FROM foo;\n SELECT * FROM bar;" If no commands are given SQL is read from the keyboard or STDIN. Example: echo 'SELECT * FROM foo;' | sql mysql:/// --csv CSV output. --db-size --dbsize Size of database. Show the size of the database on disk. For Oracle this requires access to read the table dba_data_files - the user system has that. --help -h Print a summary of the options to GNU sql and exit. --html HTML output. Turn on HTML tabular output. --json --pretty Pretty JSON output. --list-databases --listdbs --show-databases --showdbs List the databases (table spaces) in the database. --listproc --proclist --show-processlist Show the list of running queries. --list-tables --show-tables --table-list List the tables in the database. --noheaders --no-headers -n Remove headers and footers and print only tuples. Bug in Oracle: it still prints number of rows found. -p pass-through The string following -p will be given to the database connection program as arguments. Multiple -p's will be joined with space. Example: pass '-U' and the user name to the program: -p "-U scott" can also be written -p -U -p scott. --precision <rfc3339|h|m|s|ms|u|ns> Precision of timestamps. Specifiy the format of the output timestamps: rfc3339, h, m, s, ms, u or ns. -r Try 3 times. Short version of --retries 3. --retries ntimes Try ntimes times. If the client program returns with an error, retry the command. Default is --retries 1. --sep string -s string Field separator. Use string as separator between columns. --skip-first-line Do not use the first line of input (used by GNU sql itself when called with --shebang). --table-size --tablesize Size of tables. Show the size of the tables in the database. --verbose -v Print which command is sent. --version -V Print the version GNU sql and exit. --shebang -Y GNU sql can be called as a shebang (#!) command as the first line of a script. Like this: #!/usr/bin/sql -Y mysql:/// SELECT * FROM foo; For this to work --shebang or -Y must be set as the first option. DBURL A DBURL has the following syntax: [sql:]vendor:// [[user][:password]@][host][:port]/[database][?sqlquery] To quote special characters use %-encoding specified in http://tools.ietf.org/html/rfc3986#section-2.1 (E.g. a password containing '/' would contain '%2F'). Examples: mysql://scott:tiger@my.example.com/mydb influxdb://scott:tiger@influxdb.example.com/foo sql:oracle://scott:tiger@ora.example.com/xe postgresql://scott:tiger@pg.example.com/pgdb pg:/// postgresqlssl://scott@pg.example.com:3333/pgdb sql:sqlite2:////tmp/db.sqlite?SELECT * FROM foo; sqlite3:///../db.sqlite3?SELECT%20*%20FROM%20foo; Currently supported vendors: MySQL (mysql), MySQL with SSL (mysqls, mysqlssl), Oracle (oracle, ora), PostgreSQL (postgresql, pg, pgsql, postgres), PostgreSQL with SSL (postgresqlssl, pgs, pgsqlssl, postgresssl, pgssl, postgresqls, pgsqls, postgress), SQLite2 (sqlite, sqlite2), SQLite3 (sqlite3), InfluxDB 1.x (influx, influxdb), InfluxDB with SSL (influxdbssl, influxdbs, influxs, influxssl) Aliases must start with ':' and are read from /etc/sql/aliases and ~/.sql/aliases. The user's own ~/.sql/aliases should only be readable by the user. Example of aliases: :myalias1 pg://scott:tiger@pg.example.com/pgdb :myalias2 ora://scott:tiger@ora.example.com/xe # Short form of mysql://`whoami`:nopassword@localhost:3306/`whoami` :myalias3 mysql:/// # Short form of mysql://`whoami`:nopassword@localhost:33333/mydb :myalias4 mysql://:33333/mydb # Alias for an alias :m :myalias4 # the sortest alias possible : sqlite2:////tmp/db.sqlite # Including an SQL query :query sqlite:////tmp/db.sqlite?SELECT * FROM foo;
|
sql - execute a command on a database determined by a dburl
|
sql [options] dburl [commands] sql [options] dburl < commandfile #!/usr/bin/sql --shebang [options] dburl
| null |
Get an interactive prompt The most basic use of GNU sql is to get an interactive prompt: sql sql:oracle://scott:tiger@ora.example.com/xe If you have setup an alias you can do: sql :myora Run a query To run a query directly from the command line: sql :myalias "SELECT * FROM foo;" Oracle requires newlines after each statement. This can be done like this: sql :myora "SELECT * FROM foo;" "SELECT * FROM bar;" Or this: sql :myora "SELECT * FROM foo;\nSELECT * FROM bar;" Copy a PostgreSQL database To copy a PostgreSQL database use pg_dump to generate the dump and GNU sql to import it: pg_dump pg_database | sql pg://scott:tiger@pg.example.com/pgdb Empty all tables in a MySQL database Using GNU parallel it is easy to empty all tables without dropping them: sql -n mysql:/// 'show tables' | parallel sql mysql:/// DELETE FROM {}; Drop all tables in a PostgreSQL database To drop all tables in a PostgreSQL database do: sql -n pg:/// '\dt' | parallel --colsep '\|' -r sql pg:/// DROP TABLE {2}; Run as a script Instead of doing: sql mysql:/// < sqlfile you can combine the sqlfile with the DBURL to make a UNIX-script. Create a script called demosql: #!/usr/bin/sql -Y mysql:/// SELECT * FROM foo; Then do: chmod +x demosql; ./demosql Use --colsep to process multiple columns Use GNU parallel's --colsep to separate columns: sql -s '\t' :myalias 'SELECT * FROM foo;' | parallel --colsep '\t' do_stuff {4} {1} Retry if the connection fails If the access to the database fails occasionally --retries can help make sure the query succeeds: sql --retries 5 :myalias 'SELECT * FROM really_big_foo;' Get info about the running database system Show how big the database is: sql --db-size :myalias List the tables: sql --list-tables :myalias List the size of the tables: sql --table-size :myalias List the running processes: sql --show-processlist :myalias REPORTING BUGS GNU sql is part of GNU parallel. Report bugs to <bug-parallel@gnu.org>. AUTHOR When using GNU sql for a publication please cite: O. Tange (2011): GNU SQL - A Command Line Tool for Accessing Different Databases Using DBURLs, ;login: The USENIX Magazine, April 2011:29-32. Copyright (C) 2008-2010 Ole Tange http://ole.tange.dk Copyright (C) 2010-2024 Ole Tange, http://ole.tange.dk and Free Software Foundation, Inc. LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or at your option any later version. This program 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 this program. If not, see <http://www.gnu.org/licenses/>. Documentation license I Permission is granted to copy, distribute and/or modify this documentation under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the file LICENSES/GFDL-1.3-or-later.txt. Documentation license II You are free: to Share to copy, distribute and transmit the work to Remix to adapt the work Under the following conditions: Attribution You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Share Alike If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. With the understanding that: Waiver Any of the above conditions can be waived if you get permission from the copyright holder. Public Domain Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. Other Rights In no way are any of the following rights affected by the license: • Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations; • The author's moral rights; • Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. Notice For any reuse or distribution, you must make clear to others the license terms of this work. A copy of the full license is included in the file as cc-by-sa.txt. DEPENDENCIES GNU sql uses Perl. If mysql is installed, MySQL dburls will work. If psql is installed, PostgreSQL dburls will work. If sqlite is installed, SQLite2 dburls will work. If sqlite3 is installed, SQLite3 dburls will work. If sqlplus is installed, Oracle dburls will work. If rlwrap is installed, GNU sql will have a command history for Oracle. FILES ~/.sql/aliases - user's own aliases with DBURLs /etc/sql/aliases - common aliases with DBURLs SEE ALSO mysql(1), psql(1), rlwrap(1), sqlite(1), sqlite3(1), sqlplus(1), influx(1) 20240722 2024-07-21 SQL(1)
|
php-fpm
|
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This is a variant of PHP that will run in the background as a daemon, listening for CGI requests. Output is logged to /opt/homebrew/var/log/php-fpm.log. Most options are set in the configuration file. The configuration file is /opt/homebrew/etc/php/8.3/php-fpm.conf. By default, php-fpm will respond to CGI requests listening on localhost http port 9000. Therefore php-fpm expects your webserver to forward all requests for '.php' files to port 9000 and you should edit your webserver configuration file appropriately.
|
php-fpm - PHP FastCGI Process Manager 'PHP-FPM'
|
php-fpm [options]
|
-C Do not chdir to the script's directory --php-ini path|file -c path|file Look for php.ini file in the directory path or use the specified file --no-php-ini -n No php.ini file will be used --define foo[=bar] -d foo[=bar] Define INI entry foo with value bar -e Generate extended information for debugger/profiler --help -h This help --info -i PHP information and configuration --modules -m Show compiled in modules --version -v Version number --prefix path -p Specify alternative prefix path (the default is /opt/homebrew/Cellar/php/8.3.9) --pid file -g Specify the PID file location. --fpm-config file -y Specify alternative path to FastCGI process manager configuration file (the default is /opt/homebrew/etc/php/8.3/php-fpm.conf) --test -t Test FPM configuration file and exit If called twice (-tt), the configuration is dumped before exiting. --daemonize -D Force to run in background and ignore daemonize option from configuration file. --nodaemonize -F Force to stay in foreground and ignore daemonize option from configuration file. --force-stderr -O Force output to stderr in nodaemonize even if stderr is not a TTY. --allow-to-run-as-root -R Allow pool to run as root (disabled by default) FILES php-fpm.conf The configuration file for the php-fpm daemon. php.ini The standard php configuration file.
|
For any unix systems which use init.d for their main process manager, you should use the init script provided to start and stop the php-fpm daemon. sudo /etc/init.d/php-fpm start For any unix systems which use systemd for their main process manager, you should use the unit file provided to start and stop the php-fpm daemon. sudo systemctl start php-fpm.service If your installation has no appropriate init script, launch php-fpm with no arguments. It will launch as a daemon (background process) by default. The file /opt/homebrew/var/run/php-fpm.pid determines whether php-fpm is already up and running. Once started, php-fpm then responds to several POSIX signals: SIGINT,SIGTERM immediate termination SIGQUIT graceful stop SIGUSR1 re-open log file SIGUSR2 graceful reload of all workers + reload of fpm conf/binary TIPS The PHP-FPM CGI daemon will work well with most popular webservers, including Apache2, lighttpd and nginx. SEE ALSO The PHP-FPM website: http://php-fpm.org For a more or less complete description of PHP look here: http://www.php.net/manual/ A nice introduction to PHP by Stig Bakken can be found here: http://www.zend.com/zend/art/intro.php BUGS You can view the list of known bugs or report any new bug you found at: https://github.com/php/php-src/issues AUTHORS PHP-FPM SAPI was written by Andrei Nigmatulin. The mailing-lists are highload-php-en (English) and highload-php-ru (Russian). The PHP Group: Thies C. Arntzen, Stig Bakken, Andi Gutmans, Rasmus Lerdorf, Sam Ruby, Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski. A List of active developers can be found here: http://www.php.net/credits.php And last but not least PHP was developed with the help of a huge amount of contributors all around the world. VERSION INFORMATION This manpage describes php-fpm, version 8.3.9. COPYRIGHT Copyright © The PHP Group Copyright (c) 2007-2009, Andrei Nigmatulin This source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is available through the world-wide-web at the following url: https://www.php.net/license/3_01.txt If you did not receive a copy of the PHP license and are unable to obtain it through the world-wide-web, please send a note to license@php.net so we can mail you a copy immediately. The PHP Group 2024 PHP-FPM(8)
|
applygnupgdefaults
|
This is a legacy script. Modern application should use the per component global configuration files under ‘/etc/gnupg/’. This script is a wrapper around gpgconf to run it with the command --apply-defaults for all real users with an existing GnuPG home directory. Admins might want to use this script to update he GnuPG configuration files for all users after ‘/etc/gnupg/gpgconf.conf’ has been changed. This allows enforcing certain policies for all users. Note, that this is not a bulletproof way to force a user to use certain options. A user may always directly edit the configuration files and bypass gpgconf. applygnupgdefaults is invoked by root as: applygnupgdefaults GnuPG 2.4.5 2024-03-04 APPLYGNUPGDEFAULTS(8)
|
applygnupgdefaults - Run gpgconf --apply-defaults for all users.
|
applygnupgdefaults
| null | null |
unbound-anchor
|
Unbound-anchor performs setup or update of the root trust anchor for DNSSEC validation. The program fetches the trust anchor with the method from RFC7958 when regular RFC5011 update fails to bring it up to date. It can be run (as root) from the commandline, or run as part of startup scripts. Before you start the unbound(8) DNS server. Suggested usage: # in the init scripts. # provide or update the root anchor (if necessary) unbound-anchor -a "/opt/homebrew/etc/unbound/root.key" # Please note usage of this root anchor is at your own risk # and under the terms of our LICENSE (see source). # # start validating resolver # the unbound.conf contains: # auto-trust-anchor-file: "/opt/homebrew/etc/unbound/root.key" unbound -c unbound.conf This tool provides builtin default contents for the root anchor and root update certificate files. It tests if the root anchor file works, and if not, and an update is possible, attempts to update the root anchor using the root update certificate. It performs a https fetch of root-anchors.xml and checks the results (RFC7958), if all checks are successful, it updates the root anchor file. Otherwise the root anchor file is unchanged. It performs RFC5011 tracking if the DNSSEC information available via the DNS makes that possible. It does not perform an update if the certificate is expired, if the network is down or other errors occur. The available options are: -a file The root anchor key file, that is read in and written out. Default is /opt/homebrew/etc/unbound/root.key. If the file does not exist, or is empty, a builtin root key is written to it. -c file The root update certificate file, that is read in. Default is /opt/homebrew/etc/unbound/icannbundle.pem. If the file does not exist, or is empty, a builtin certificate is used. -l List the builtin root key and builtin root update certificate on stdout. -u name The server name, it connects to https://name. Specify without https:// prefix. The default is "data.iana.org". It connects to the port specified with -P. You can pass an IPv4 address or IPv6 address (no brackets) if you want. -S Do not use SNI for the HTTPS connection. Default is to use SNI. -b address The source address to bind to for domain resolution and contacting the server on https. May be either an IPv4 address or IPv6 address (no brackets). -x path The pathname to the root-anchors.xml file on the server. (forms URL with -u). The default is /root-anchors/root-anchors.xml. -s path The pathname to the root-anchors.p7s file on the server. (forms URL with -u). The default is /root-anchors/root-anchors.p7s. This file has to be a PKCS7 signature over the xml file, using the pem file (-c) as trust anchor. -n name The emailAddress for the Subject of the signer's certificate from the p7s signature file. Only signatures from this name are allowed. default is dnssec@iana.org. If you pass "" then the emailAddress is not checked. -4 Use IPv4 for domain resolution and contacting the server on https. Default is to use IPv4 and IPv6 where appropriate. -6 Use IPv6 for domain resolution and contacting the server on https. Default is to use IPv4 and IPv6 where appropriate. -f resolv.conf Use the given resolv.conf file. Not enabled by default, but you could try to pass /etc/resolv.conf on some systems. It contains the IP addresses of the recursive nameservers to use. However, since this tool could be used to bootstrap that very recursive nameserver, it would not be useful (since that server is not up yet, since we are bootstrapping it). It could be useful in a situation where you know an upstream cache is deployed (and running) and in captive portal situations. -r root.hints Use the given root.hints file (same syntax as the BIND and Unbound root hints file) to bootstrap domain resolution. By default a list of builtin root hints is used. Unbound-anchor goes to the network itself for these roots, to resolve the server (-u option) and to check the root DNSKEY records. It does so, because the tool when used for bootstrapping the recursive resolver, cannot use that recursive resolver itself because it is bootstrapping that server. -R Allow fallback from -f resolv.conf file to direct root servers query. It allows you to prefer local resolvers, but fallback automatically to direct root query if they do not respond or do not support DNSSEC. -v More verbose. Once prints informational messages, multiple times may enable large debug amounts (such as full certificates or byte-dumps of downloaded files). By default it prints almost nothing. It also prints nothing on errors by default; in that case the original root anchor file is simply left undisturbed, so that a recursive server can start right after it. -C unbound.conf Debug option to read unbound.conf into the resolver process used. -P port Set the port number to use for the https connection. The default is 443. -F Debug option to force update of the root anchor through downloading the xml file and verifying it with the certificate. By default it first tries to update by contacting the DNS, which uses much less bandwidth, is much faster (200 msec not 2 sec), and is nicer to the deployed infrastructure. With this option, it still attempts to do so (and may verbosely tell you), but then ignores the result and goes on to use the xml fallback method. -h Show the version and commandline option help. EXIT CODE This tool exits with value 1 if the root anchor was updated using the certificate or if the builtin root-anchor was used. It exits with code 0 if no update was necessary, if the update was possible with RFC5011 tracking, or if an error occurred. You can check the exit value in this manner: unbound-anchor -a "root.key" || logger "Please check root.key" Or something more suitable for your operational environment. TRUST The root keys and update certificate included in this tool are provided for convenience and under the terms of our license (see the LICENSE file in the source distribution or https://github.com/NLnetLabs/unbound/blob/master/LICENSE) and might be stale or not suitable to your purpose. By running "unbound-anchor -l" the keys and certificate that are configured in the code are printed for your convenience. The build-in configuration can be overridden by providing a root-cert file and a rootkey file. FILES /opt/homebrew/etc/unbound/root.key The root anchor file, updated with 5011 tracking, and read and written to. The file is created if it does not exist. /opt/homebrew/etc/unbound/icannbundle.pem The trusted self-signed certificate that is used to verify the downloaded DNSSEC root trust anchor. You can update it by fetching it from https://data.iana.org/root-anchors/icannbundle.pem (and validate it). If the file does not exist or is empty, a builtin version is used. https://data.iana.org/root-anchors/root-anchors.xml Source for the root key information. https://data.iana.org/root-anchors/root-anchors.p7s Signature on the root key information. SEE ALSO unbound.conf(5), unbound(8). NLnet Labs May 8, 2024 unbound-anchor(8)
|
unbound-anchor - Unbound anchor utility.
|
unbound-anchor [opts]
| null | null |
addgnupghome
|
If GnuPG is installed on a system with existing user accounts, it is sometimes required to populate the GnuPG home directory with existing files. Especially a ‘trustlist.txt’ and a keybox with some initial certificates are often desired. This script helps to do this by copying all files from ‘/etc/skel/.gnupg’ to the home directories of the accounts given on the command line. It takes care not to overwrite existing GnuPG home directories. addgnupghome is invoked by root as: addgnupghome account1 account2 ... accountn GnuPG 2.4.5 2024-03-04 ADDGNUPGHOME(8)
|
addgnupghome - Create .gnupg home directories
|
addgnupghome account_1 account_2...account_n
| null | null |
unbound-checkconf
|
Unbound-checkconf checks the configuration file for the unbound(8) DNS resolver for syntax and other errors. The config file syntax is described in unbound.conf(5). The available options are: -h Show the version and commandline option help. -f Print full pathname, with chroot applied to it. Use with the -o option. -o option If given, after checking the config file the value of this option is printed to stdout. For "" (disabled) options an empty line is printed. -q Make the operation quiet, suppress output on success. cfgfile The config file to read with settings for Unbound. It is checked. If omitted, the config file at the default location is checked. EXIT CODE The unbound-checkconf program exits with status code 1 on error, 0 for a correct config file. FILES /opt/homebrew/etc/unbound/unbound.conf Unbound configuration file. SEE ALSO unbound.conf(5), unbound(8). NLnet Labs May 8, 2024 unbound-checkconf(8)
|
unbound-checkconf - Check Unbound configuration file for errors.
|
unbound-checkconf [-h] [-f] [-q] [-o option] [cfgfile]
| null | null |
unbound-control
|
Unbound-control performs remote administration on the unbound(8) DNS server. It reads the configuration file, contacts the Unbound server over SSL sends the command and displays the result. The available options are: -h Show the version and commandline option help. -c cfgfile The config file to read with settings. If not given the default config file /opt/homebrew/etc/unbound/unbound.conf is used. -s server[@port] IPv4 or IPv6 address of the server to contact. If not given, the address is read from the config file. -q quiet, if the option is given it does not print anything if it works ok. COMMANDS There are several commands that the server understands. start Start the server. Simply execs unbound(8). The Unbound executable is searched for in the PATH set in the environment. It is started with the config file specified using -c or the default config file. stop Stop the server. The server daemon exits. reload Reload the server. This flushes the cache and reads the config file fresh. reload_keep_cache Reload the server but try to keep the RRset and message cache if (re)configuration allows for it. That means the caches sizes and the number of threads must not change between reloads. verbosity number Change verbosity value for logging. Same values as verbosity keyword in unbound.conf(5). This new setting lasts until the server is issued a reload (taken from config file again), or the next verbosity control command. log_reopen Reopen the logfile, close and open it. Useful for logrotation to make the daemon release the file it is logging to. If you are using syslog it will attempt to close and open the syslog (which may not work if chrooted). stats Print statistics. Resets the internal counters to zero, this can be controlled using the statistics-cumulative config statement. Statistics are printed with one [name]: [value] per line. stats_noreset Peek at statistics. Prints them like the stats command does, but does not reset the internal counters to zero. status Display server status. Exit code 3 if not running (the connection to the port is refused), 1 on error, 0 if running. local_zone name type Add new local zone with name and type. Like local-zone config statement. If the zone already exists, the type is changed to the given argument. local_zone_remove name Remove the local zone with the given name. Removes all local data inside it. If the zone does not exist, the command succeeds. local_data RR data... Add new local data, the given resource record. Like local-data config statement, except for when no covering zone exists. In that case this remote control command creates a transparent zone with the same name as this record. local_data_remove name Remove all RR data from local name. If the name already has no items, nothing happens. Often results in NXDOMAIN for the name (in a static zone), but if the name has become an empty nonterminal (there is still data in domain names below the removed name), NOERROR nodata answers are the result for that name. local_zones Add local zones read from stdin of unbound-control. Input is read per line, with name space type on a line. For bulk additions. local_zones_remove Remove local zones read from stdin of unbound-control. Input is one name per line. For bulk removals. local_datas Add local data RRs read from stdin of unbound-control. Input is one RR per line. For bulk additions. local_datas_remove Remove local data RRs read from stdin of unbound-control. Input is one name per line. For bulk removals. dump_cache The contents of the cache is printed in a text format to stdout. You can redirect it to a file to store the cache in a file. load_cache The contents of the cache is loaded from stdin. Uses the same format as dump_cache uses. Loading the cache with old, or wrong data can result in old or wrong data returned to clients. Loading data into the cache in this way is supported in order to aid with debugging. lookup name Print to stdout the name servers that would be used to look up the name specified. flush name Remove the name from the cache. Removes the types A, AAAA, NS, SOA, CNAME, DNAME, MX, PTR, SRV, NAPTR, SVCB and HTTPS. Because that is fast to do. Other record types can be removed using flush_type or flush_zone. flush_type name type Remove the name, type information from the cache. flush_zone name Remove all information at or below the name from the cache. The rrsets and key entries are removed so that new lookups will be performed. This needs to walk and inspect the entire cache, and is a slow operation. The entries are set to expired in the implementation of this command (so, with serve-expired enabled, it'll serve that information but schedule a prefetch for new information). flush_bogus Remove all bogus data from the cache. flush_negative Remove all negative data from the cache. This is nxdomain answers, nodata answers and servfail answers. Also removes bad key entries (which could be due to failed lookups) from the dnssec key cache, and iterator last-resort lookup failures from the rrset cache. flush_stats Reset statistics to zero. flush_requestlist Drop the queries that are worked on. Stops working on the queries that the server is working on now. The cache is unaffected. No reply is sent for those queries, probably making those users request again later. Useful to make the server restart working on queries with new settings, such as a higher verbosity level. dump_requestlist Show what is worked on. Prints all queries that the server is currently working on. Prints the time that users have been waiting. For internal requests, no time is printed. And then prints out the module status. This prints the queries from the first thread, and not queries that are being serviced from other threads. flush_infra all|IP If all then entire infra cache is emptied. If a specific IP address, the entry for that address is removed from the cache. It contains EDNS, ping and lameness data. dump_infra Show the contents of the infra cache. set_option opt: val Set the option to the given value without a reload. The cache is therefore not flushed. The option must end with a ':' and whitespace must be between the option and the value. Some values may not have an effect if set this way, the new values are not written to the config file, not all options are supported. This is different from the set_option call in libunbound, where all values work because Unbound has not been initialized. The values that work are: statistics-interval, statistics-cumulative, do-not-query-localhost, harden-short-bufsize, harden-large-queries, harden-glue, harden-dnssec-stripped, harden-below-nxdomain, harden-referral-path, prefetch, prefetch-key, log-queries, hide-identity, hide-version, identity, version, val-log-level, val-log-squelch, ignore-cd-flag, add-holddown, del-holddown, keep-missing, tcp-upstream, ssl-upstream, max-udp-size, ratelimit, ip-ratelimit, cache-max-ttl, cache-min-ttl, cache-max-negative-ttl. get_option opt Get the value of the option. Give the option name without a trailing ':'. The value is printed. If the value is "", nothing is printed and the connection closes. On error 'error ...' is printed (it gives a syntax error on unknown option). For some options a list of values, one on each line, is printed. The options are shown from the config file as modified with set_option. For some options an override may have been taken that does not show up with this command, not results from e.g. the verbosity and forward control commands. Not all options work, see list_stubs, list_forwards, list_local_zones and list_local_data for those. list_stubs List the stub zones in use. These are printed one by one to the output. This includes the root hints in use. list_forwards List the forward zones in use. These are printed zone by zone to the output. list_insecure List the zones with domain-insecure. list_local_zones List the local zones in use. These are printed one per line with zone type. list_local_data List the local data RRs in use. The resource records are printed. insecure_add zone Add a domain-insecure for the given zone, like the statement in unbound.conf. Adds to the running Unbound without affecting the cache contents (which may still be bogus, use flush_zone to remove it), does not affect the config file. insecure_remove zone Removes domain-insecure for the given zone. forward_add [+it] zone addr ... Add a new forward zone to running Unbound. With +i option also adds a domain-insecure for the zone (so it can resolve insecurely if you have a DNSSEC root trust anchor configured for other names). The addr can be IP4, IP6 or nameserver names, like forward-zone config in unbound.conf. The +t option sets it to use tls upstream, like forward-tls-upstream: yes. forward_remove [+i] zone Remove a forward zone from running Unbound. The +i also removes a domain-insecure for the zone. stub_add [+ipt] zone addr ... Add a new stub zone to running Unbound. With +i option also adds a domain-insecure for the zone. With +p the stub zone is set to prime, without it it is set to notprime. The addr can be IP4, IP6 or nameserver names, like the stub-zone config in unbound.conf. The +t option sets it to use tls upstream, like stub-tls-upstream: yes. stub_remove [+i] zone Remove a stub zone from running Unbound. The +i also removes a domain-insecure for the zone. forward [off | addr ... ] Setup forwarding mode. Configures if the server should ask other upstream nameservers, should go to the internet root nameservers itself, or show the current config. You could pass the nameservers after a DHCP update. Without arguments the current list of addresses used to forward all queries to is printed. On startup this is from the forward-zone "." configuration. Afterwards it shows the status. It prints off when no forwarding is used. If off is passed, forwarding is disabled and the root nameservers are used. This can be used to avoid to avoid buggy or non-DNSSEC supporting nameservers returned from DHCP. But may not work in hotels or hotspots. If one or more IPv4 or IPv6 addresses are given, those are then used to forward queries to. The addresses must be separated with spaces. With '@port' the port number can be set explicitly (default port is 53 (DNS)). By default the forwarder information from the config file for the root "." is used. The config file is not changed, so after a reload these changes are gone. Other forward zones from the config file are not affected by this command. ratelimit_list [+a] List the domains that are ratelimited. Printed one per line with current estimated qps and qps limit from config. With +a it prints all domains, not just the ratelimited domains, with their estimated qps. The ratelimited domains return an error for uncached (new) queries, but cached queries work as normal. ip_ratelimit_list [+a] List the ip addresses that are ratelimited. Printed one per line with current estimated qps and qps limit from config. With +a it prints all ips, not just the ratelimited ips, with their estimated qps. The ratelimited ips are dropped before checking the cache. list_auth_zones List the auth zones that are configured. Printed one per line with a status, indicating if the zone is expired and current serial number. Configured RPZ zones are included. auth_zone_reload zone Reload the auth zone (or RPZ zone) from zonefile. The zonefile is read in overwriting the current contents of the zone in memory. This changes the auth zone contents itself, not the cache contents. Such cache contents exists if you set Unbound to validate with for-upstream yes and that can be cleared with flush_zone zone. auth_zone_transfer zone Transfer the auth zone (or RPZ zone) from master. The auth zone probe sequence is started, where the masters are probed to see if they have an updated zone (with the SOA serial check). And then the zone is transferred for a newer zone version. rpz_enable zone Enable the RPZ zone if it had previously been disabled. rpz_disable zone Disable the RPZ zone. view_list_local_zones view list_local_zones for given view. view_local_zone view name type local_zone for given view. view_local_zone_remove view name local_zone_remove for given view. view_list_local_data view list_local_data for given view. view_local_data view RR data... local_data for given view. view_local_data_remove view name local_data_remove for given view. view_local_datas_remove view Remove a list of local_data for given view from stdin. Like local_datas_remove. view_local_datas view Add a list of local_data for given view from stdin. Like local_datas. EXIT CODE The unbound-control program exits with status code 1 on error, 0 on success. SET UP The setup requires a self-signed certificate and private keys for both the server and client. The script unbound-control-setup generates these in the default run directory, or with -d in another directory. If you change the access control permissions on the key files you can decide who can use unbound-control, by default owner and group but not all users. Run the script under the same username as you have configured in unbound.conf or as root, so that the daemon is permitted to read the files, for example with: sudo -u unbound unbound-control-setup If you have not configured a username in unbound.conf, the keys need read permission for the user credentials under which the daemon is started. The script preserves private keys present in the directory. After running the script as root, turn on control-enable in unbound.conf. STATISTIC COUNTERS The stats command shows a number of statistic counters. threadX.num.queries number of queries received by thread threadX.num.queries_ip_ratelimited number of queries rate limited by thread threadX.num.queries_cookie_valid number of queries with a valid DNS Cookie by thread threadX.num.queries_cookie_client number of queries with a client part only DNS Cookie by thread threadX.num.queries_cookie_invalid number of queries with an invalid DNS Cookie by thread threadX.num.cachehits number of queries that were successfully answered using a cache lookup threadX.num.cachemiss number of queries that needed recursive processing threadX.num.dnscrypt.crypted number of queries that were encrypted and successfully decapsulated by dnscrypt. threadX.num.dnscrypt.cert number of queries that were requesting dnscrypt certificates. threadX.num.dnscrypt.cleartext number of queries received on dnscrypt port that were cleartext and not a request for certificates. threadX.num.dnscrypt.malformed number of request that were neither cleartext, not valid dnscrypt messages. threadX.num.prefetch number of cache prefetches performed. This number is included in cachehits, as the original query had the unprefetched answer from cache, and resulted in recursive processing, taking a slot in the requestlist. Not part of the recursivereplies (or the histogram thereof) or cachemiss, as a cache response was sent. threadX.num.expired number of replies that served an expired cache entry. threadX.num.queries_timed_out number of queries that are dropped because they waited in the UDP socket buffer for too long. threadX.query.queue_time_us.max The maximum wait time for packets in the socket buffer, in microseconds. This is only reported when sock-queue-timeout is enabled. threadX.num.recursivereplies The number of replies sent to queries that needed recursive processing. Could be smaller than threadX.num.cachemiss if due to timeouts no replies were sent for some queries. threadX.requestlist.avg The average number of requests in the internal recursive processing request list on insert of a new incoming recursive processing query. threadX.requestlist.max Maximum size attained by the internal recursive processing request list. threadX.requestlist.overwritten Number of requests in the request list that were overwritten by newer entries. This happens if there is a flood of queries that recursive processing and the server has a hard time. threadX.requestlist.exceeded Queries that were dropped because the request list was full. This happens if a flood of queries need recursive processing, and the server can not keep up. threadX.requestlist.current.all Current size of the request list, includes internally generated queries (such as priming queries and glue lookups). threadX.requestlist.current.user Current size of the request list, only the requests from client queries. threadX.recursion.time.avg Average time it took to answer queries that needed recursive processing. Note that queries that were answered from the cache are not in this average. threadX.recursion.time.median The median of the time it took to answer queries that needed recursive processing. The median means that 50% of the user queries were answered in less than this time. Because of big outliers (usually queries to non responsive servers), the average can be bigger than the median. This median has been calculated by interpolation from a histogram. threadX.tcpusage The currently held tcp buffers for incoming connections. A spot value on the time of the request. This helps you spot if the incoming-num-tcp buffers are full. total.num.queries summed over threads. total.num.queries_ip_ratelimited summed over threads. total.num.queries_cookie_valid summed over threads. total.num.queries_cookie_client summed over threads. total.num.queries_cookie_invalid summed over threads. total.num.cachehits summed over threads. total.num.cachemiss summed over threads. total.num.dnscrypt.crypted summed over threads. total.num.dnscrypt.cert summed over threads. total.num.dnscrypt.cleartext summed over threads. total.num.dnscrypt.malformed summed over threads. total.num.prefetch summed over threads. total.num.expired summed over threads. total.num.queries_timed_out summed over threads. total.query.queue_time_us.max the maximum of the thread values. total.num.recursivereplies summed over threads. total.requestlist.avg averaged over threads. total.requestlist.max the maximum of the thread requestlist.max values. total.requestlist.overwritten summed over threads. total.requestlist.exceeded summed over threads. total.requestlist.current.all summed over threads. total.recursion.time.median averaged over threads. total.tcpusage summed over threads. time.now current time in seconds since 1970. time.up uptime since server boot in seconds. time.elapsed time since last statistics printout, in seconds. EXTENDED STATISTICS mem.cache.rrset Memory in bytes in use by the RRset cache. mem.cache.message Memory in bytes in use by the message cache. mem.cache.dnscrypt_shared_secret Memory in bytes in use by the dnscrypt shared secrets cache. mem.cache.dnscrypt_nonce Memory in bytes in use by the dnscrypt nonce cache. mem.mod.iterator Memory in bytes in use by the iterator module. mem.mod.validator Memory in bytes in use by the validator module. Includes the key cache and negative cache. mem.streamwait Memory in bytes in used by the TCP and TLS stream wait buffers. These are answers waiting to be written back to the clients. mem.http.query_buffer Memory in bytes used by the HTTP/2 query buffers. Containing (partial) DNS queries waiting for request stream completion. mem.http.response_buffer Memory in bytes used by the HTTP/2 response buffers. Containing DNS responses waiting to be written back to the clients. histogram.<sec>.<usec>.to.<sec>.<usec> Shows a histogram, summed over all threads. Every element counts the recursive queries whose reply time fit between the lower and upper bound. Times larger or equal to the lowerbound, and smaller than the upper bound. There are 40 buckets, with bucket sizes doubling. num.query.type.A The total number of queries over all threads with query type A. Printed for the other query types as well, but only for the types for which queries were received, thus =0 entries are omitted for brevity. num.query.type.other Number of queries with query types 256-65535. num.query.class.IN The total number of queries over all threads with query class IN (internet). Also printed for other classes (such as CH (CHAOS) sometimes used for debugging), or NONE, ANY, used by dynamic update. num.query.class.other is printed for classes 256-65535. num.query.opcode.QUERY The total number of queries over all threads with query opcode QUERY. Also printed for other opcodes, UPDATE, ... num.query.tcp Number of queries that were made using TCP towards the Unbound server. num.query.tcpout Number of queries that the Unbound server made using TCP outgoing towards other servers. num.query.udpout Number of queries that the Unbound server made using UDP outgoing towards other servers. num.query.tls Number of queries that were made using TLS towards the Unbound server. These are also counted in num.query.tcp, because TLS uses TCP. num.query.tls.resume Number of TLS session resumptions, these are queries over TLS towards the Unbound server where the client negotiated a TLS session resumption key. num.query.https Number of queries that were made using HTTPS towards the Unbound server. These are also counted in num.query.tcp and num.query.tls, because HTTPS uses TLS and TCP. num.query.ipv6 Number of queries that were made using IPv6 towards the Unbound server. num.query.flags.RD The number of queries that had the RD flag set in the header. Also printed for flags QR, AA, TC, RA, Z, AD, CD. Note that queries with flags QR, AA or TC may have been rejected because of that. num.query.edns.present number of queries that had an EDNS OPT record present. num.query.edns.DO number of queries that had an EDNS OPT record with the DO (DNSSEC OK) bit set. These queries are also included in the num.query.edns.present number. num.query.ratelimited The number of queries that are turned away from being send to nameserver due to ratelimiting. num.query.dnscrypt.shared_secret.cachemiss The number of dnscrypt queries that did not find a shared secret in the cache. This can be used to compute the shared secret hitrate. num.query.dnscrypt.replay The number of dnscrypt queries that found a nonce hit in the nonce cache and hence are considered a query replay. num.answer.rcode.NXDOMAIN The number of answers to queries, from cache or from recursion, that had the return code NXDOMAIN. Also printed for the other return codes. num.answer.rcode.nodata The number of answers to queries that had the pseudo return code nodata. This means the actual return code was NOERROR, but additionally, no data was carried in the answer (making what is called a NOERROR/NODATA answer). These queries are also included in the num.answer.rcode.NOERROR number. Common for AAAA lookups when an A record exists, and no AAAA. num.answer.secure Number of answers that were secure. The answer validated correctly. The AD bit might have been set in some of these answers, where the client signalled (with DO or AD bit in the query) that they were ready to accept the AD bit in the answer. num.answer.bogus Number of answers that were bogus. These answers resulted in SERVFAIL to the client because the answer failed validation. num.rrset.bogus The number of rrsets marked bogus by the validator. Increased for every RRset inspection that fails. unwanted.queries Number of queries that were refused or dropped because they failed the access control settings. unwanted.replies Replies that were unwanted or unsolicited. Could have been random traffic, delayed duplicates, very late answers, or could be spoofing attempts. Some low level of late answers and delayed duplicates are to be expected with the UDP protocol. Very high values could indicate a threat (spoofing). msg.cache.count The number of items (DNS replies) in the message cache. rrset.cache.count The number of RRsets in the rrset cache. This includes rrsets used by the messages in the message cache, but also delegation information. infra.cache.count The number of items in the infra cache. These are IP addresses with their timing and protocol support information. key.cache.count The number of items in the key cache. These are DNSSEC keys, one item per delegation point, and their validation status. msg.cache.max_collisions The maximum number of hash table collisions in the msg cache. This is the number of hashes that are identical when a new element is inserted in the hash table. If the value is very large, like hundreds, something is wrong with the performance of the hash table, hash values are incorrect or malicious. rrset.cache.max_collisions The maximum number of hash table collisions in the rrset cache. This is the number of hashes that are identical when a new element is inserted in the hash table. If the value is very large, like hundreds, something is wrong with the performance of the hash table, hash values are incorrect or malicious. dnscrypt_shared_secret.cache.count The number of items in the shared secret cache. These are precomputed shared secrets for a given client public key/server secret key pair. Shared secrets are CPU intensive and this cache allows Unbound to avoid recomputing the shared secret when multiple dnscrypt queries are sent from the same client. dnscrypt_nonce.cache.count The number of items in the client nonce cache. This cache is used to prevent dnscrypt queries replay. The client nonce must be unique for each client public key/server secret key pair. This cache should be able to host QPS * `replay window` interval keys to prevent replay of a query during `replay window` seconds. num.query.authzone.up The number of queries answered from auth-zone data, upstream queries. These queries would otherwise have been sent (with fallback enabled) to the internet, but are now answered from the auth zone. num.query.authzone.down The number of queries for downstream answered from auth-zone data. These queries are from downstream clients, and have had an answer from the data in the auth zone. num.query.aggressive.NOERROR The number of queries answered using cached NSEC records with NODATA RCODE. These queries would otherwise have been sent to the internet, but are now answered using cached data. num.query.aggressive.NXDOMAIN The number of queries answered using cached NSEC records with NXDOMAIN RCODE. These queries would otherwise have been sent to the internet, but are now answered using cached data. num.query.subnet Number of queries that got an answer that contained EDNS client subnet data. num.query.subnet_cache Number of queries answered from the edns client subnet cache. These are counted as cachemiss by the main counters, but hit the client subnet specific cache after getting processed by the edns client subnet module. num.query.cachedb Number of queries answered from the external cache of cachedb. These are counted as cachemiss by the main counters, but hit the cachedb external cache after getting processed by the cachedb module. num.rpz.action.<rpz_action> Number of queries answered using configured RPZ policy, per RPZ action type. Possible actions are: nxdomain, nodata, passthru, drop, tcp-only, local-data, disabled, and cname-override. FILES /opt/homebrew/etc/unbound/unbound.conf Unbound configuration file. /opt/homebrew/etc/unbound directory with private keys (unbound_server.key and unbound_control.key) and self-signed certificates (unbound_server.pem and unbound_control.pem). SEE ALSO unbound.conf(5), unbound(8). NLnet Labs May 8, 2024 unbound-control(8)
|
unbound-control, unbound-control-setup - Unbound remote server control utility.
|
unbound-control [-hq] [-c cfgfile] [-s server] command
| null | null |
unbound
|
Unbound is a caching DNS resolver. It uses a built in list of authoritative nameservers for the root zone (.), the so called root hints. On receiving a DNS query it will ask the root nameservers for an answer and will in almost all cases receive a delegation to a top level domain (TLD) authoritative nameserver. It will then ask that nameserver for an answer. It will recursively continue until an answer is found or no answer is available (NXDOMAIN). For performance and efficiency reasons that answer is cached for a certain time (the answer's time-to-live or TTL). A second query for the same name will then be answered from the cache. Unbound can also do DNSSEC validation. To use a locally running Unbound for resolving put nameserver 127.0.0.1 into resolv.conf(5). If authoritative DNS is needed as well using nsd(8), careful setup is required because authoritative nameservers and resolvers are using the same port number (53). The available options are: -h Show the version number and commandline option help, and exit. -c cfgfile Set the config file with settings for Unbound to read instead of reading the file at the default location, /opt/homebrew/etc/unbound/unbound.conf. The syntax is described in unbound.conf(5). -d Debug flag: do not fork into the background, but stay attached to the console. This flag will also delay writing to the log file until the thread-spawn time, so that most config and setup errors appear on stderr. If given twice or more, logging does not switch to the log file or to syslog, but the log messages are printed to stderr all the time. -p Don't use a pidfile. This argument should only be used by supervision systems which can ensure that only one instance of Unbound will run concurrently. -v Increase verbosity. If given multiple times, more information is logged. This is added to the verbosity (if any) from the config file. -V Show the version number and build options, and exit. SEE ALSO unbound.conf(5), unbound-checkconf(8), nsd(8). AUTHORS Unbound developers are mentioned in the CREDITS file in the distribution. NLnet Labs May 8, 2024 unbound(8)
|
unbound - Unbound DNS validating resolver 1.20.0.
|
unbound [-h] [-d] [-p] [-v] [-c cfgfile]
| null | null |
unbound-control-setup
|
Unbound-control performs remote administration on the unbound(8) DNS server. It reads the configuration file, contacts the Unbound server over SSL sends the command and displays the result. The available options are: -h Show the version and commandline option help. -c cfgfile The config file to read with settings. If not given the default config file /opt/homebrew/etc/unbound/unbound.conf is used. -s server[@port] IPv4 or IPv6 address of the server to contact. If not given, the address is read from the config file. -q quiet, if the option is given it does not print anything if it works ok. COMMANDS There are several commands that the server understands. start Start the server. Simply execs unbound(8). The Unbound executable is searched for in the PATH set in the environment. It is started with the config file specified using -c or the default config file. stop Stop the server. The server daemon exits. reload Reload the server. This flushes the cache and reads the config file fresh. reload_keep_cache Reload the server but try to keep the RRset and message cache if (re)configuration allows for it. That means the caches sizes and the number of threads must not change between reloads. verbosity number Change verbosity value for logging. Same values as verbosity keyword in unbound.conf(5). This new setting lasts until the server is issued a reload (taken from config file again), or the next verbosity control command. log_reopen Reopen the logfile, close and open it. Useful for logrotation to make the daemon release the file it is logging to. If you are using syslog it will attempt to close and open the syslog (which may not work if chrooted). stats Print statistics. Resets the internal counters to zero, this can be controlled using the statistics-cumulative config statement. Statistics are printed with one [name]: [value] per line. stats_noreset Peek at statistics. Prints them like the stats command does, but does not reset the internal counters to zero. status Display server status. Exit code 3 if not running (the connection to the port is refused), 1 on error, 0 if running. local_zone name type Add new local zone with name and type. Like local-zone config statement. If the zone already exists, the type is changed to the given argument. local_zone_remove name Remove the local zone with the given name. Removes all local data inside it. If the zone does not exist, the command succeeds. local_data RR data... Add new local data, the given resource record. Like local-data config statement, except for when no covering zone exists. In that case this remote control command creates a transparent zone with the same name as this record. local_data_remove name Remove all RR data from local name. If the name already has no items, nothing happens. Often results in NXDOMAIN for the name (in a static zone), but if the name has become an empty nonterminal (there is still data in domain names below the removed name), NOERROR nodata answers are the result for that name. local_zones Add local zones read from stdin of unbound-control. Input is read per line, with name space type on a line. For bulk additions. local_zones_remove Remove local zones read from stdin of unbound-control. Input is one name per line. For bulk removals. local_datas Add local data RRs read from stdin of unbound-control. Input is one RR per line. For bulk additions. local_datas_remove Remove local data RRs read from stdin of unbound-control. Input is one name per line. For bulk removals. dump_cache The contents of the cache is printed in a text format to stdout. You can redirect it to a file to store the cache in a file. load_cache The contents of the cache is loaded from stdin. Uses the same format as dump_cache uses. Loading the cache with old, or wrong data can result in old or wrong data returned to clients. Loading data into the cache in this way is supported in order to aid with debugging. lookup name Print to stdout the name servers that would be used to look up the name specified. flush name Remove the name from the cache. Removes the types A, AAAA, NS, SOA, CNAME, DNAME, MX, PTR, SRV, NAPTR, SVCB and HTTPS. Because that is fast to do. Other record types can be removed using flush_type or flush_zone. flush_type name type Remove the name, type information from the cache. flush_zone name Remove all information at or below the name from the cache. The rrsets and key entries are removed so that new lookups will be performed. This needs to walk and inspect the entire cache, and is a slow operation. The entries are set to expired in the implementation of this command (so, with serve-expired enabled, it'll serve that information but schedule a prefetch for new information). flush_bogus Remove all bogus data from the cache. flush_negative Remove all negative data from the cache. This is nxdomain answers, nodata answers and servfail answers. Also removes bad key entries (which could be due to failed lookups) from the dnssec key cache, and iterator last-resort lookup failures from the rrset cache. flush_stats Reset statistics to zero. flush_requestlist Drop the queries that are worked on. Stops working on the queries that the server is working on now. The cache is unaffected. No reply is sent for those queries, probably making those users request again later. Useful to make the server restart working on queries with new settings, such as a higher verbosity level. dump_requestlist Show what is worked on. Prints all queries that the server is currently working on. Prints the time that users have been waiting. For internal requests, no time is printed. And then prints out the module status. This prints the queries from the first thread, and not queries that are being serviced from other threads. flush_infra all|IP If all then entire infra cache is emptied. If a specific IP address, the entry for that address is removed from the cache. It contains EDNS, ping and lameness data. dump_infra Show the contents of the infra cache. set_option opt: val Set the option to the given value without a reload. The cache is therefore not flushed. The option must end with a ':' and whitespace must be between the option and the value. Some values may not have an effect if set this way, the new values are not written to the config file, not all options are supported. This is different from the set_option call in libunbound, where all values work because Unbound has not been initialized. The values that work are: statistics-interval, statistics-cumulative, do-not-query-localhost, harden-short-bufsize, harden-large-queries, harden-glue, harden-dnssec-stripped, harden-below-nxdomain, harden-referral-path, prefetch, prefetch-key, log-queries, hide-identity, hide-version, identity, version, val-log-level, val-log-squelch, ignore-cd-flag, add-holddown, del-holddown, keep-missing, tcp-upstream, ssl-upstream, max-udp-size, ratelimit, ip-ratelimit, cache-max-ttl, cache-min-ttl, cache-max-negative-ttl. get_option opt Get the value of the option. Give the option name without a trailing ':'. The value is printed. If the value is "", nothing is printed and the connection closes. On error 'error ...' is printed (it gives a syntax error on unknown option). For some options a list of values, one on each line, is printed. The options are shown from the config file as modified with set_option. For some options an override may have been taken that does not show up with this command, not results from e.g. the verbosity and forward control commands. Not all options work, see list_stubs, list_forwards, list_local_zones and list_local_data for those. list_stubs List the stub zones in use. These are printed one by one to the output. This includes the root hints in use. list_forwards List the forward zones in use. These are printed zone by zone to the output. list_insecure List the zones with domain-insecure. list_local_zones List the local zones in use. These are printed one per line with zone type. list_local_data List the local data RRs in use. The resource records are printed. insecure_add zone Add a domain-insecure for the given zone, like the statement in unbound.conf. Adds to the running Unbound without affecting the cache contents (which may still be bogus, use flush_zone to remove it), does not affect the config file. insecure_remove zone Removes domain-insecure for the given zone. forward_add [+it] zone addr ... Add a new forward zone to running Unbound. With +i option also adds a domain-insecure for the zone (so it can resolve insecurely if you have a DNSSEC root trust anchor configured for other names). The addr can be IP4, IP6 or nameserver names, like forward-zone config in unbound.conf. The +t option sets it to use tls upstream, like forward-tls-upstream: yes. forward_remove [+i] zone Remove a forward zone from running Unbound. The +i also removes a domain-insecure for the zone. stub_add [+ipt] zone addr ... Add a new stub zone to running Unbound. With +i option also adds a domain-insecure for the zone. With +p the stub zone is set to prime, without it it is set to notprime. The addr can be IP4, IP6 or nameserver names, like the stub-zone config in unbound.conf. The +t option sets it to use tls upstream, like stub-tls-upstream: yes. stub_remove [+i] zone Remove a stub zone from running Unbound. The +i also removes a domain-insecure for the zone. forward [off | addr ... ] Setup forwarding mode. Configures if the server should ask other upstream nameservers, should go to the internet root nameservers itself, or show the current config. You could pass the nameservers after a DHCP update. Without arguments the current list of addresses used to forward all queries to is printed. On startup this is from the forward-zone "." configuration. Afterwards it shows the status. It prints off when no forwarding is used. If off is passed, forwarding is disabled and the root nameservers are used. This can be used to avoid to avoid buggy or non-DNSSEC supporting nameservers returned from DHCP. But may not work in hotels or hotspots. If one or more IPv4 or IPv6 addresses are given, those are then used to forward queries to. The addresses must be separated with spaces. With '@port' the port number can be set explicitly (default port is 53 (DNS)). By default the forwarder information from the config file for the root "." is used. The config file is not changed, so after a reload these changes are gone. Other forward zones from the config file are not affected by this command. ratelimit_list [+a] List the domains that are ratelimited. Printed one per line with current estimated qps and qps limit from config. With +a it prints all domains, not just the ratelimited domains, with their estimated qps. The ratelimited domains return an error for uncached (new) queries, but cached queries work as normal. ip_ratelimit_list [+a] List the ip addresses that are ratelimited. Printed one per line with current estimated qps and qps limit from config. With +a it prints all ips, not just the ratelimited ips, with their estimated qps. The ratelimited ips are dropped before checking the cache. list_auth_zones List the auth zones that are configured. Printed one per line with a status, indicating if the zone is expired and current serial number. Configured RPZ zones are included. auth_zone_reload zone Reload the auth zone (or RPZ zone) from zonefile. The zonefile is read in overwriting the current contents of the zone in memory. This changes the auth zone contents itself, not the cache contents. Such cache contents exists if you set Unbound to validate with for-upstream yes and that can be cleared with flush_zone zone. auth_zone_transfer zone Transfer the auth zone (or RPZ zone) from master. The auth zone probe sequence is started, where the masters are probed to see if they have an updated zone (with the SOA serial check). And then the zone is transferred for a newer zone version. rpz_enable zone Enable the RPZ zone if it had previously been disabled. rpz_disable zone Disable the RPZ zone. view_list_local_zones view list_local_zones for given view. view_local_zone view name type local_zone for given view. view_local_zone_remove view name local_zone_remove for given view. view_list_local_data view list_local_data for given view. view_local_data view RR data... local_data for given view. view_local_data_remove view name local_data_remove for given view. view_local_datas_remove view Remove a list of local_data for given view from stdin. Like local_datas_remove. view_local_datas view Add a list of local_data for given view from stdin. Like local_datas. EXIT CODE The unbound-control program exits with status code 1 on error, 0 on success. SET UP The setup requires a self-signed certificate and private keys for both the server and client. The script unbound-control-setup generates these in the default run directory, or with -d in another directory. If you change the access control permissions on the key files you can decide who can use unbound-control, by default owner and group but not all users. Run the script under the same username as you have configured in unbound.conf or as root, so that the daemon is permitted to read the files, for example with: sudo -u unbound unbound-control-setup If you have not configured a username in unbound.conf, the keys need read permission for the user credentials under which the daemon is started. The script preserves private keys present in the directory. After running the script as root, turn on control-enable in unbound.conf. STATISTIC COUNTERS The stats command shows a number of statistic counters. threadX.num.queries number of queries received by thread threadX.num.queries_ip_ratelimited number of queries rate limited by thread threadX.num.queries_cookie_valid number of queries with a valid DNS Cookie by thread threadX.num.queries_cookie_client number of queries with a client part only DNS Cookie by thread threadX.num.queries_cookie_invalid number of queries with an invalid DNS Cookie by thread threadX.num.cachehits number of queries that were successfully answered using a cache lookup threadX.num.cachemiss number of queries that needed recursive processing threadX.num.dnscrypt.crypted number of queries that were encrypted and successfully decapsulated by dnscrypt. threadX.num.dnscrypt.cert number of queries that were requesting dnscrypt certificates. threadX.num.dnscrypt.cleartext number of queries received on dnscrypt port that were cleartext and not a request for certificates. threadX.num.dnscrypt.malformed number of request that were neither cleartext, not valid dnscrypt messages. threadX.num.prefetch number of cache prefetches performed. This number is included in cachehits, as the original query had the unprefetched answer from cache, and resulted in recursive processing, taking a slot in the requestlist. Not part of the recursivereplies (or the histogram thereof) or cachemiss, as a cache response was sent. threadX.num.expired number of replies that served an expired cache entry. threadX.num.queries_timed_out number of queries that are dropped because they waited in the UDP socket buffer for too long. threadX.query.queue_time_us.max The maximum wait time for packets in the socket buffer, in microseconds. This is only reported when sock-queue-timeout is enabled. threadX.num.recursivereplies The number of replies sent to queries that needed recursive processing. Could be smaller than threadX.num.cachemiss if due to timeouts no replies were sent for some queries. threadX.requestlist.avg The average number of requests in the internal recursive processing request list on insert of a new incoming recursive processing query. threadX.requestlist.max Maximum size attained by the internal recursive processing request list. threadX.requestlist.overwritten Number of requests in the request list that were overwritten by newer entries. This happens if there is a flood of queries that recursive processing and the server has a hard time. threadX.requestlist.exceeded Queries that were dropped because the request list was full. This happens if a flood of queries need recursive processing, and the server can not keep up. threadX.requestlist.current.all Current size of the request list, includes internally generated queries (such as priming queries and glue lookups). threadX.requestlist.current.user Current size of the request list, only the requests from client queries. threadX.recursion.time.avg Average time it took to answer queries that needed recursive processing. Note that queries that were answered from the cache are not in this average. threadX.recursion.time.median The median of the time it took to answer queries that needed recursive processing. The median means that 50% of the user queries were answered in less than this time. Because of big outliers (usually queries to non responsive servers), the average can be bigger than the median. This median has been calculated by interpolation from a histogram. threadX.tcpusage The currently held tcp buffers for incoming connections. A spot value on the time of the request. This helps you spot if the incoming-num-tcp buffers are full. total.num.queries summed over threads. total.num.queries_ip_ratelimited summed over threads. total.num.queries_cookie_valid summed over threads. total.num.queries_cookie_client summed over threads. total.num.queries_cookie_invalid summed over threads. total.num.cachehits summed over threads. total.num.cachemiss summed over threads. total.num.dnscrypt.crypted summed over threads. total.num.dnscrypt.cert summed over threads. total.num.dnscrypt.cleartext summed over threads. total.num.dnscrypt.malformed summed over threads. total.num.prefetch summed over threads. total.num.expired summed over threads. total.num.queries_timed_out summed over threads. total.query.queue_time_us.max the maximum of the thread values. total.num.recursivereplies summed over threads. total.requestlist.avg averaged over threads. total.requestlist.max the maximum of the thread requestlist.max values. total.requestlist.overwritten summed over threads. total.requestlist.exceeded summed over threads. total.requestlist.current.all summed over threads. total.recursion.time.median averaged over threads. total.tcpusage summed over threads. time.now current time in seconds since 1970. time.up uptime since server boot in seconds. time.elapsed time since last statistics printout, in seconds. EXTENDED STATISTICS mem.cache.rrset Memory in bytes in use by the RRset cache. mem.cache.message Memory in bytes in use by the message cache. mem.cache.dnscrypt_shared_secret Memory in bytes in use by the dnscrypt shared secrets cache. mem.cache.dnscrypt_nonce Memory in bytes in use by the dnscrypt nonce cache. mem.mod.iterator Memory in bytes in use by the iterator module. mem.mod.validator Memory in bytes in use by the validator module. Includes the key cache and negative cache. mem.streamwait Memory in bytes in used by the TCP and TLS stream wait buffers. These are answers waiting to be written back to the clients. mem.http.query_buffer Memory in bytes used by the HTTP/2 query buffers. Containing (partial) DNS queries waiting for request stream completion. mem.http.response_buffer Memory in bytes used by the HTTP/2 response buffers. Containing DNS responses waiting to be written back to the clients. histogram.<sec>.<usec>.to.<sec>.<usec> Shows a histogram, summed over all threads. Every element counts the recursive queries whose reply time fit between the lower and upper bound. Times larger or equal to the lowerbound, and smaller than the upper bound. There are 40 buckets, with bucket sizes doubling. num.query.type.A The total number of queries over all threads with query type A. Printed for the other query types as well, but only for the types for which queries were received, thus =0 entries are omitted for brevity. num.query.type.other Number of queries with query types 256-65535. num.query.class.IN The total number of queries over all threads with query class IN (internet). Also printed for other classes (such as CH (CHAOS) sometimes used for debugging), or NONE, ANY, used by dynamic update. num.query.class.other is printed for classes 256-65535. num.query.opcode.QUERY The total number of queries over all threads with query opcode QUERY. Also printed for other opcodes, UPDATE, ... num.query.tcp Number of queries that were made using TCP towards the Unbound server. num.query.tcpout Number of queries that the Unbound server made using TCP outgoing towards other servers. num.query.udpout Number of queries that the Unbound server made using UDP outgoing towards other servers. num.query.tls Number of queries that were made using TLS towards the Unbound server. These are also counted in num.query.tcp, because TLS uses TCP. num.query.tls.resume Number of TLS session resumptions, these are queries over TLS towards the Unbound server where the client negotiated a TLS session resumption key. num.query.https Number of queries that were made using HTTPS towards the Unbound server. These are also counted in num.query.tcp and num.query.tls, because HTTPS uses TLS and TCP. num.query.ipv6 Number of queries that were made using IPv6 towards the Unbound server. num.query.flags.RD The number of queries that had the RD flag set in the header. Also printed for flags QR, AA, TC, RA, Z, AD, CD. Note that queries with flags QR, AA or TC may have been rejected because of that. num.query.edns.present number of queries that had an EDNS OPT record present. num.query.edns.DO number of queries that had an EDNS OPT record with the DO (DNSSEC OK) bit set. These queries are also included in the num.query.edns.present number. num.query.ratelimited The number of queries that are turned away from being send to nameserver due to ratelimiting. num.query.dnscrypt.shared_secret.cachemiss The number of dnscrypt queries that did not find a shared secret in the cache. This can be used to compute the shared secret hitrate. num.query.dnscrypt.replay The number of dnscrypt queries that found a nonce hit in the nonce cache and hence are considered a query replay. num.answer.rcode.NXDOMAIN The number of answers to queries, from cache or from recursion, that had the return code NXDOMAIN. Also printed for the other return codes. num.answer.rcode.nodata The number of answers to queries that had the pseudo return code nodata. This means the actual return code was NOERROR, but additionally, no data was carried in the answer (making what is called a NOERROR/NODATA answer). These queries are also included in the num.answer.rcode.NOERROR number. Common for AAAA lookups when an A record exists, and no AAAA. num.answer.secure Number of answers that were secure. The answer validated correctly. The AD bit might have been set in some of these answers, where the client signalled (with DO or AD bit in the query) that they were ready to accept the AD bit in the answer. num.answer.bogus Number of answers that were bogus. These answers resulted in SERVFAIL to the client because the answer failed validation. num.rrset.bogus The number of rrsets marked bogus by the validator. Increased for every RRset inspection that fails. unwanted.queries Number of queries that were refused or dropped because they failed the access control settings. unwanted.replies Replies that were unwanted or unsolicited. Could have been random traffic, delayed duplicates, very late answers, or could be spoofing attempts. Some low level of late answers and delayed duplicates are to be expected with the UDP protocol. Very high values could indicate a threat (spoofing). msg.cache.count The number of items (DNS replies) in the message cache. rrset.cache.count The number of RRsets in the rrset cache. This includes rrsets used by the messages in the message cache, but also delegation information. infra.cache.count The number of items in the infra cache. These are IP addresses with their timing and protocol support information. key.cache.count The number of items in the key cache. These are DNSSEC keys, one item per delegation point, and their validation status. msg.cache.max_collisions The maximum number of hash table collisions in the msg cache. This is the number of hashes that are identical when a new element is inserted in the hash table. If the value is very large, like hundreds, something is wrong with the performance of the hash table, hash values are incorrect or malicious. rrset.cache.max_collisions The maximum number of hash table collisions in the rrset cache. This is the number of hashes that are identical when a new element is inserted in the hash table. If the value is very large, like hundreds, something is wrong with the performance of the hash table, hash values are incorrect or malicious. dnscrypt_shared_secret.cache.count The number of items in the shared secret cache. These are precomputed shared secrets for a given client public key/server secret key pair. Shared secrets are CPU intensive and this cache allows Unbound to avoid recomputing the shared secret when multiple dnscrypt queries are sent from the same client. dnscrypt_nonce.cache.count The number of items in the client nonce cache. This cache is used to prevent dnscrypt queries replay. The client nonce must be unique for each client public key/server secret key pair. This cache should be able to host QPS * `replay window` interval keys to prevent replay of a query during `replay window` seconds. num.query.authzone.up The number of queries answered from auth-zone data, upstream queries. These queries would otherwise have been sent (with fallback enabled) to the internet, but are now answered from the auth zone. num.query.authzone.down The number of queries for downstream answered from auth-zone data. These queries are from downstream clients, and have had an answer from the data in the auth zone. num.query.aggressive.NOERROR The number of queries answered using cached NSEC records with NODATA RCODE. These queries would otherwise have been sent to the internet, but are now answered using cached data. num.query.aggressive.NXDOMAIN The number of queries answered using cached NSEC records with NXDOMAIN RCODE. These queries would otherwise have been sent to the internet, but are now answered using cached data. num.query.subnet Number of queries that got an answer that contained EDNS client subnet data. num.query.subnet_cache Number of queries answered from the edns client subnet cache. These are counted as cachemiss by the main counters, but hit the client subnet specific cache after getting processed by the edns client subnet module. num.query.cachedb Number of queries answered from the external cache of cachedb. These are counted as cachemiss by the main counters, but hit the cachedb external cache after getting processed by the cachedb module. num.rpz.action.<rpz_action> Number of queries answered using configured RPZ policy, per RPZ action type. Possible actions are: nxdomain, nodata, passthru, drop, tcp-only, local-data, disabled, and cname-override. FILES /opt/homebrew/etc/unbound/unbound.conf Unbound configuration file. /opt/homebrew/etc/unbound directory with private keys (unbound_server.key and unbound_control.key) and self-signed certificates (unbound_server.pem and unbound_control.pem). SEE ALSO unbound.conf(5), unbound(8). NLnet Labs May 8, 2024 unbound-control(8)
|
unbound-control, unbound-control-setup - Unbound remote server control utility.
|
unbound-control [-hq] [-c cfgfile] [-s server] command
| null | null |
unbound-host
|
Unbound-host uses the Unbound validating resolver to query for the hostname and display results. With the -v option it displays validation status: secure, insecure, bogus (security failure). By default it reads no configuration file whatsoever. It attempts to reach the internet root servers. With -C an Unbound config file and with -r resolv.conf can be read. The available options are: hostname This name is resolved (looked up in the DNS). If a IPv4 or IPv6 address is given, a reverse lookup is performed. -h Show the version and commandline option help. -v Enable verbose output and it shows validation results, on every line. Secure means that the NXDOMAIN (no such domain name), nodata (no such data) or positive data response validated correctly with one of the keys. Insecure means that that domain name has no security set up for it. Bogus (security failure) means that the response failed one or more checks, it is likely wrong, outdated, tampered with, or broken. -d Enable debug output to stderr. One -d shows what the resolver and validator are doing and may tell you what is going on. More times, -d -d, gives a lot of output, with every packet sent and received. -c class Specify the class to lookup for, the default is IN the internet class. -t type Specify the type of data to lookup. The default looks for IPv4, IPv6 and mail handler data, or domain name pointers for reverse queries. -y key Specify a public key to use as trust anchor. This is the base for a chain of trust that is built up from the trust anchor to the response, in order to validate the response message. Can be given as a DS or DNSKEY record. For example -y "example.com DS 31560 5 1 1CFED84787E6E19CCF9372C1187325972FE546CD". -D Enables DNSSEC validation. Reads the root anchor from the default configured root anchor at the default location, /opt/homebrew/etc/unbound/root.key. -f keyfile Reads keys from a file. Every line has a DS or DNSKEY record, in the format as for -y. The zone file format, the same as dig and drill produce. -F namedkeyfile Reads keys from a BIND-style named.conf file. Only the trusted-key {}; entries are read. -C configfile Uses the specified unbound.conf to prime libunbound(3). Pass it as first argument if you want to override some options from the config file with further arguments on the commandline. -r Read /etc/resolv.conf, and use the forward DNS servers from there (those could have been set by DHCP). More info in resolv.conf(5). Breaks validation if those servers do not support DNSSEC. -4 Use solely the IPv4 network for sending packets. -6 Use solely the IPv6 network for sending packets.
|
unbound-host - unbound DNS lookup utility
|
unbound-host [-C configfile] [-vdhr46D] [-c class] [-t type] [-y key] [-f keyfile] [-F namedkeyfile] hostname
| null |
Some examples of use. The keys shown below are fakes, thus a security failure is encountered. $ unbound-host www.example.com $ unbound-host -v -y "example.com DS 31560 5 1 1CFED84787E6E19CCF9372C1187325972FE546CD" www.example.com $ unbound-host -v -y "example.com DS 31560 5 1 1CFED84787E6E19CCF9372C1187325972FE546CD" 192.0.2.153 EXIT CODE The unbound-host program exits with status code 1 on error, 0 on no error. The data may not be available on exit code 0, exit code 1 means the lookup encountered a fatal error. SEE ALSO unbound.conf(5), unbound(8). NLnet Labs May 8, 2024 unbound-host(1)
|
dnsmasq
|
dnsmasq is a lightweight DNS, TFTP, PXE, router advertisement and DHCP server. It is intended to provide coupled DNS and DHCP service to a LAN. Dnsmasq accepts DNS queries and either answers them from a small, local, cache or forwards them to a real, recursive, DNS server. It loads the contents of /etc/hosts so that local hostnames which do not appear in the global DNS can be resolved and also answers DNS queries for DHCP configured hosts. It can also act as the authoritative DNS server for one or more domains, allowing local names to appear in the global DNS. It can be configured to do DNSSEC validation. The dnsmasq DHCP server supports static address assignments and multiple networks. It automatically sends a sensible default set of DHCP options, and can be configured to send any desired set of DHCP options, including vendor-encapsulated options. It includes a secure, read-only, TFTP server to allow net/PXE boot of DHCP hosts and also supports BOOTP. The PXE support is full featured, and includes a proxy mode which supplies PXE information to clients whilst DHCP address allocation is done by another server. The dnsmasq DHCPv6 server provides the same set of features as the DHCPv4 server, and in addition, it includes router advertisements and a neat feature which allows naming for clients which use DHCPv4 and stateless autoconfiguration only for IPv6 configuration. There is support for doing address allocation (both DHCPv6 and RA) from subnets which are dynamically delegated via DHCPv6 prefix delegation. Dnsmasq is coded with small embedded systems in mind. It aims for the smallest possible memory footprint compatible with the supported functions, and allows unneeded functions to be omitted from the compiled binary.
|
dnsmasq - A lightweight DHCP and caching DNS server.
|
dnsmasq [OPTION]...
|
Note that in general missing parameters are allowed and switch off functions, for instance "--pid-file" disables writing a PID file. On BSD, unless the GNU getopt library is linked, the long form of the options does not work on the command line; it is still recognised in the configuration file. --test Read and syntax check configuration file(s). Exit with code 0 if all is OK, or a non-zero code otherwise. Do not start up dnsmasq. -w, --help Display all command-line options. --help dhcp will display known DHCPv4 configuration options, and --help dhcp6 will display DHCPv6 options. -h, --no-hosts Don't read the hostnames in /etc/hosts. -H, --addn-hosts=<file> Additional hosts file. Read the specified file as well as /etc/hosts. If --no-hosts is given, read only the specified file. This option may be repeated for more than one additional hosts file. If a directory is given, then read all the files contained in that directory in alphabetical order. --hostsdir=<path> Read all the hosts files contained in the directory. New or changed files are read automatically and modified and deleted files have removed records automatically deleted. -E, --expand-hosts Add the domain to simple names (without a period) in /etc/hosts in the same way as for DHCP-derived names. Note that this does not apply to domain names in cnames, PTR records, TXT records etc. -T, --local-ttl=<time> When replying with information from /etc/hosts or configuration or the DHCP leases file dnsmasq by default sets the time-to-live field to zero, meaning that the requester should not itself cache the information. This is the correct thing to do in almost all situations. This option allows a time-to-live (in seconds) to be given for these replies. This will reduce the load on the server at the expense of clients using stale data under some circumstances. --dhcp-ttl=<time> As for --local-ttl, but affects only replies with information from DHCP leases. If both are given, --dhcp-ttl applies for DHCP information, and --local-ttl for others. Setting this to zero eliminates the effect of --local-ttl for DHCP. --neg-ttl=<time> Negative replies from upstream servers normally contain time-to- live information in SOA records which dnsmasq uses for caching. If the replies from upstream servers omit this information, dnsmasq does not cache the reply. This option gives a default value for time-to-live (in seconds) which dnsmasq uses to cache negative replies even in the absence of an SOA record. --max-ttl=<time> Set a maximum TTL value that will be handed out to clients. The specified maximum TTL will be given to clients instead of the true TTL value if it is lower. The true TTL value is however kept in the cache to avoid flooding the upstream DNS servers. --max-cache-ttl=<time> Set a maximum TTL value for entries in the cache. --min-cache-ttl=<time> Extend short TTL values to the time given when caching them. Note that artificially extending TTL values is in general a bad idea, do not do it unless you have a good reason, and understand what you are doing. Dnsmasq limits the value of this option to one hour, unless recompiled. --auth-ttl=<time> Set the TTL value returned in answers from the authoritative server. --fast-dns-retry=[<initial retry delay in ms>[,<time to continue retries in ms>]] Under normal circumstances, dnsmasq relies on DNS clients to do retries; it does not generate timeouts itself. Setting this option instructs dnsmasq to generate its own retries starting after a delay which defaults to 1000ms. If the second parameter is given this controls how long the retries will continue for otherwise this defaults to 10000ms. Retries are repeated with exponential backoff. Using this option increases memory usage and network bandwidth. -k, --keep-in-foreground Do not go into the background at startup but otherwise run as normal. This is intended for use when dnsmasq is run under daemontools or launchd. -d, --no-daemon Debug mode: don't fork to the background, don't write a pid file, don't change user id, generate a complete cache dump on receipt on SIGUSR1, log to stderr as well as syslog, don't fork new processes to handle TCP queries. Note that this option is for use in debugging only, to stop dnsmasq daemonising in production, use --keep-in-foreground. -q, --log-queries Log the results of DNS queries handled by dnsmasq. Enable a full cache dump on receipt of SIGUSR1. If the argument "extra" is supplied, ie --log-queries=extra then the log has extra information at the start of each line. This consists of a serial number which ties together the log lines associated with an individual query, and the IP address of the requestor. -8, --log-facility=<facility> Set the facility to which dnsmasq will send syslog entries, this defaults to DAEMON, and to LOCAL0 when debug mode is in operation. If the facility given contains at least one '/' character, it is taken to be a filename, and dnsmasq logs to the given file, instead of syslog. If the facility is '-' then dnsmasq logs to stderr. (Errors whilst reading configuration will still go to syslog, but all output from a successful startup, and all output whilst running, will go exclusively to the file.) When logging to a file, dnsmasq will close and reopen the file when it receives SIGUSR2. This allows the log file to be rotated without stopping dnsmasq. --log-debug Enable extra logging intended for debugging rather than information. --log-async[=<lines>] Enable asynchronous logging and optionally set the limit on the number of lines which will be queued by dnsmasq when writing to the syslog is slow. Dnsmasq can log asynchronously: this allows it to continue functioning without being blocked by syslog, and allows syslog to use dnsmasq for DNS queries without risking deadlock. If the queue of log-lines becomes full, dnsmasq will log the overflow, and the number of messages lost. The default queue length is 5, a sane value would be 5-25, and a maximum limit of 100 is imposed. -x, --pid-file=<path> Specify an alternate path for dnsmasq to record its process-id in. Normally /opt/homebrew/var/run/dnsmasq/dnsmasq.pid. -u, --user=<username> Specify the userid to which dnsmasq will change after startup. Dnsmasq must normally be started as root, but it will drop root privileges after startup by changing id to another user. Normally this user is "nobody" but that can be over-ridden with this switch. -g, --group=<groupname> Specify the group which dnsmasq will run as. The default is "dip", if available, to facilitate access to /opt/homebrew/etc/dnsmasq.d/ppp/resolv.conf which is not normally world readable. -v, --version Print the version number. -p, --port=<port> Listen on <port> instead of the standard DNS port (53). Setting this to zero completely disables DNS function, leaving only DHCP and/or TFTP. -P, --edns-packet-max=<size> Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder. Defaults to 4096, which is the RFC5625-recommended size. -Q, --query-port=<query_port> Send outbound DNS queries from, and listen for their replies on, the specific UDP port <query_port> instead of using random ports. NOTE that using this option will make dnsmasq less secure against DNS spoofing attacks but it may be faster and use less resources. Setting this option to zero makes dnsmasq use a single port allocated to it by the OS: this was the default behaviour in versions prior to 2.43. --port-limit=<#ports> By default, when sending a query via random ports to multiple upstream servers or retrying a query dnsmasq will use a single random port for all the tries/retries. This option allows a larger number of ports to be used, which can increase robustness in certain network configurations. Note that increasing this to more than two or three can have security and resource implications and should only be done with understanding of those. --min-port=<port> Do not use ports less than that given as source for outbound DNS queries. Dnsmasq picks random ports as source for outbound queries: when this option is given, the ports used will always be larger than that specified. Useful for systems behind firewalls. If not specified, defaults to 1024. --max-port=<port> Use ports lower than that given as source for outbound DNS queries. Dnsmasq picks random ports as source for outbound queries: when this option is given, the ports used will always be lower than that specified. Useful for systems behind firewalls. -i, --interface=<interface name> Listen only on the specified interface(s). Dnsmasq automatically adds the loopback (local) interface to the list of interfaces to use when the --interface option is used. If no --interface or --listen-address options are given dnsmasq listens on all available interfaces except any given in --except-interface options. On Linux, when --bind-interfaces or --bind-dynamic are in effect, IP alias interface labels (eg "eth1:0") are checked, rather than interface names. In the degenerate case when an interface has one address, this amounts to the same thing but when an interface has multiple addresses it allows control over which of those addresses are accepted. The same effect is achievable in default mode by using --listen-address. A simple wildcard, consisting of a trailing '*', can be used in --interface and --except-interface options. -I, --except-interface=<interface name> Do not listen on the specified interface. Note that the order of --listen-address --interface and --except-interface options does not matter and that --except-interface options always override the others. The comments about interface labels for --listen-address apply here. --auth-server=<domain>,[<interface>|<ip-address>...] Enable DNS authoritative mode for queries arriving at an interface or address. Note that the interface or address need not be mentioned in --interface or --listen-address configuration, indeed --auth-server will override these and provide a different DNS service on the specified interface. The <domain> is the "glue record". It should resolve in the global DNS to an A and/or AAAA record which points to the address dnsmasq is listening on. When an interface is specified, it may be qualified with "/4" or "/6" to specify only the IPv4 or IPv6 addresses associated with the interface. Since any defined authoritative zones are also available as part of the normal recusive DNS service supplied by dnsmasq, it can make sense to have an --auth-server declaration with no interfaces or address, but simply specifying the primary external nameserver. --local-service Accept DNS queries only from hosts whose address is on a local subnet, ie a subnet for which an interface exists on the server. This option only has effect if there are no --interface, --except-interface, --listen-address or --auth-server options. It is intended to be set as a default on installation, to allow unconfigured installations to be useful but also safe from being used for DNS amplification attacks. -2, --no-dhcp-interface=<interface name> Do not provide DHCP or TFTP on the specified interface, but do provide DNS service. -a, --listen-address=<ipaddr> Listen on the given IP address(es). Both --interface and --listen-address options may be given, in which case the set of both interfaces and addresses is used. Note that if no --interface option is given, but --listen-address is, dnsmasq will not automatically listen on the loopback interface. To achieve this, its IP address, 127.0.0.1, must be explicitly given as a --listen-address option. -z, --bind-interfaces On systems which support it, dnsmasq binds the wildcard address, even when it is listening on only some interfaces. It then discards requests that it shouldn't reply to. This has the advantage of working even when interfaces come and go and change address. This option forces dnsmasq to really bind only the interfaces it is listening on. About the only time when this is useful is when running another nameserver (or another instance of dnsmasq) on the same machine. Setting this option also enables multiple instances of dnsmasq which provide DHCP service to run in the same machine. --bind-dynamic Enable a network mode which is a hybrid between --bind-interfaces and the default. Dnsmasq binds the address of individual interfaces, allowing multiple dnsmasq instances, but if new interfaces or addresses appear, it automatically listens on those (subject to any access-control configuration). This makes dynamically created interfaces work in the same way as the default. Implementing this option requires non-standard networking APIs and it is only available under Linux. On other platforms it falls-back to --bind-interfaces mode. -y, --localise-queries Return answers to DNS queries from /etc/hosts and --interface- name and --dynamic-host which depend on the interface over which the query was received. If a name has more than one address associated with it, and at least one of those addresses is on the same subnet as the interface to which the query was sent, then return only the address(es) on that subnet and return all the available addresses otherwise. This allows for a server to have multiple addresses in /etc/hosts corresponding to each of its interfaces, and hosts will get the correct address based on which network they are attached to. Currently this facility is limited to IPv4. -b, --bogus-priv Bogus private reverse lookups. All reverse lookups for private IP ranges (ie 192.168.x.x, etc) which are not found in /etc/hosts or the DHCP leases file are answered with "no such domain" rather than being forwarded upstream. The set of prefixes affected is the list given in RFC6303, for IPv4 and IPv6. -V, --alias=[<old-ip>]|[<start-ip>-<end-ip>],<new-ip>[,<mask>] Modify IPv4 addresses returned from upstream nameservers; old-ip is replaced by new-ip. If the optional mask is given then any address which matches the masked old-ip will be re-written. So, for instance --alias=1.2.3.0,6.7.8.0,255.255.255.0 will map 1.2.3.56 to 6.7.8.56 and 1.2.3.67 to 6.7.8.67. This is what Cisco PIX routers call "DNS doctoring". If the old IP is given as range, then only addresses in the range, rather than a whole subnet, are re-written. So --alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 -B, --bogus-nxdomain=<ipaddr>[/prefix] Transform replies which contain the specified address or subnet into "No such domain" replies. IPv4 and IPv6 are supported. This is intended to counteract a devious move made by Verisign in September 2003 when they started returning the address of an advertising web page in response to queries for unregistered names, instead of the correct NXDOMAIN response. This option tells dnsmasq to fake the correct response when it sees this behaviour. As at Sept 2003 the IP address being returned by Verisign is 64.94.110.11 --ignore-address=<ipaddr>[/prefix] Ignore replies to A or AAAA queries which include the specified address or subnet. No error is generated, dnsmasq simply continues to listen for another reply. This is useful to defeat blocking strategies which rely on quickly supplying a forged answer to a DNS request for certain domain, before the correct answer can arrive. -f, --filterwin2k Later versions of windows make periodic DNS requests which don't get sensible answers from the public DNS and can cause problems by triggering dial-on-demand links. This flag turns on an option to filter such requests. The requests blocked are for records of type ANY where the requested name has underscores, to catch LDAP requests, and for all records of types SOA and SRV. --filter-A Remove A records from answers. No IPv4 addresses will be returned. --filter-AAAA Remove AAAA records from answers. No IPv6 addresses will be returned. -r, --resolv-file=<file> Read the IP addresses of the upstream nameservers from <file>, instead of /etc/resolv.conf. For the format of this file see resolv.conf(5). The only lines relevant to dnsmasq are nameserver ones. Dnsmasq can be told to poll more than one resolv.conf file, the first file name specified overrides the default, subsequent ones add to the list. This is only allowed when polling; the file with the currently latest modification time is the one used. -R, --no-resolv Don't read /etc/resolv.conf. Get upstream servers only from the command line or the dnsmasq configuration file. -1, --enable-dbus[=<service-name>] Allow dnsmasq configuration to be updated via DBus method calls. The configuration which can be changed is upstream DNS servers (and corresponding domains) and cache clear. Requires that dnsmasq has been built with DBus support. If the service name is given, dnsmasq provides service at that name, rather than the default which is uk.org.thekelleys.dnsmasq --enable-ubus[=<service-name>] Enable dnsmasq UBus interface. It sends notifications via UBus on DHCPACK and DHCPRELEASE events. Furthermore it offers metrics and allows configuration of Linux connection track mark based filtering. When DNS query filtering based on Linux connection track marks is enabled UBus notifications are generated for each resolved or filtered DNS query. Requires that dnsmasq has been built with UBus support. If the service name is given, dnsmasq provides service at that namespace, rather than the default which is dnsmasq -o, --strict-order By default, dnsmasq will send queries to any of the upstream servers it knows about and tries to favour servers that are known to be up. Setting this flag forces dnsmasq to try each query with each server strictly in the order they appear in /etc/resolv.conf --all-servers By default, when dnsmasq has more than one upstream server available, it will send queries to just one server. Setting this flag forces dnsmasq to send all queries to all available servers. The reply from the server which answers first will be returned to the original requester. --dns-loop-detect Enable code to detect DNS forwarding loops; ie the situation where a query sent to one of the upstream server eventually returns as a new query to the dnsmasq instance. The process works by generating TXT queries of the form <hex>.test and sending them to each upstream server. The hex is a UID which encodes the instance of dnsmasq sending the query and the upstream server to which it was sent. If the query returns to the server which sent it, then the upstream server through which it was sent is disabled and this event is logged. Each time the set of upstream servers changes, the test is re-run on all of them, including ones which were previously disabled. --stop-dns-rebind Reject (and log) addresses from upstream nameservers which are in the private ranges. This blocks an attack where a browser behind a firewall is used to probe machines on the local network. For IPv6, the private range covers the IPv4-mapped addresses in private space plus all link-local (LL) and site- local (ULA) addresses. --rebind-localhost-ok Exempt 127.0.0.0/8 and ::1 from rebinding checks. This address range is returned by realtime black hole servers, so blocking it may disable these services. --rebind-domain-ok=[<domain>]|[[/<domain>/[<domain>/] Do not detect and block dns-rebind on queries to these domains. The argument may be either a single domain, or multiple domains surrounded by '/', like the --server syntax, eg. --rebind-domain-ok=/domain1/domain2/domain3/ -n, --no-poll Don't poll /etc/resolv.conf for changes. --clear-on-reload Whenever /etc/resolv.conf is re-read or the upstream servers are set via DBus, clear the DNS cache. This is useful when new nameservers may have different data than that held in cache. -D, --domain-needed Tells dnsmasq to never forward A or AAAA queries for plain names, without dots or domain parts, to upstream nameservers. If the name is not known from /etc/hosts or DHCP then a "not found" answer is returned. -S, --local, --server=[/[<domain>]/[domain/]][<server>[#<port>]][@<interface>][@<source-ip>[#<port>]] Specify upstream servers directly. Setting this flag does not suppress reading of /etc/resolv.conf, use --no-resolv to do that. If one or more optional domains are given, that server is used only for those domains and they are queried only using the specified server. This is intended for private nameservers: if you have a nameserver on your network which deals with names of the form xxx.internal.thekelleys.org.uk at 192.168.1.1 then giving the flag --server=/internal.thekelleys.org.uk/192.168.1.1 will send all queries for internal machines to that nameserver, everything else will go to the servers in /etc/resolv.conf. DNSSEC validation is turned off for such private nameservers, UNLESS a --trust-anchor is specified for the domain in question. An empty domain specification, // has the special meaning of "unqualified names only" ie names without any dots in them. A non-standard port may be specified as part of the IP address using a # character. More than one --server flag is allowed, with repeated domain or ipaddr parts as required. More specific domains take precedence over less specific domains, so: --server=/google.com/1.2.3.4 --server=/www.google.com/2.3.4.5 will send queries for google.com and gmail.google.com to 1.2.3.4, but www.google.com will go to 2.3.4.5 Matching of domains is normally done on complete labels, so /google.com/ matches google.com and www.google.com but NOT supergoogle.com. This can be overridden with a * at the start of a pattern only: /*google.com/ will match google.com and www.google.com AND supergoogle.com. The non-wildcard form has priority, so if /google.com/ and /*google.com/ are both specified then google.com and www.google.com will match /google.com/ and /*google.com/ will only match supergoogle.com. For historical reasons, the pattern /.google.com/ is equivalent to /google.com/ if you wish to match any subdomain of google.com but NOT google.com itself, use /*.google.com/ The special server address '#' means, "use the standard servers", so --server=/google.com/1.2.3.4 --server=/www.google.com/# will send queries for google.com and its subdomains to 1.2.3.4, except www.google.com (and its subdomains) which will be forwarded as usual. Also permitted is a -S flag which gives a domain but no IP address; this tells dnsmasq that a domain is local and it may answer queries from /etc/hosts or DHCP but should never forward queries on that domain to any upstream servers. --local is a synonym for --server to make configuration files clearer in this case. IPv6 addresses may include an %interface scope-id, eg fe80::202:a412:4512:7bbf%eth0. The optional string after the @ character tells dnsmasq how to set the source of the queries to this nameserver. It can either be an ip-address, an interface name or both. The ip-address should belong to the machine on which dnsmasq is running, otherwise this server line will be logged and then ignored. If an interface name is given, then queries to the server will be forced via that interface; if an ip-address is given then the source address of the queries will be set to that address; and if both are given then a combination of ip-address and interface name will be used to steer requests to the server. The query- port flag is ignored for any servers which have a source address specified but the port may be specified directly as part of the source address. Forcing queries to an interface is not implemented on all platforms supported by dnsmasq. Upstream servers may be specified with a hostname rather than an IP address. In this case, dnsmasq will try to use the system resolver to get the IP address of a server during startup. If name resolution fails, starting dnsmasq fails, too. If the system's configuration is such that the system resolver sends DNS queries through the dnsmasq instance which is starting up then this will time-out and fail. --rev-server=<ip-address>[/<prefix-len>][,<server>][#<port>][@<interface>][@<source-ip>[#<port>]] This is functionally the same as --server, but provides some syntactic sugar to make specifying address-to-name queries easier. For example --rev-server=1.2.3.0/24,192.168.0.1 is exactly equivalent to --server=/3.2.1.in-addr.arpa/192.168.0.1 Allowed prefix lengths are 1-32 (IPv4) and 1-128 (IPv6). If the prefix length is omitted, dnsmasq substitutes either 32 (IPv4) or 128 (IPv6). -A, --address=/<domain>[/<domain>...]/[<ipaddr>] Specify an IP address to return for any host in the given domains. A (or AAAA) queries in the domains are never forwarded and always replied to with the specified IP address which may be IPv4 or IPv6. To give multiple addresses or both IPv4 and IPv6 addresses for a domain, use repeated --address flags. Note that /etc/hosts and DHCP leases override this for individual names. A common use of this is to redirect the entire doubleclick.net domain to some friendly local web server to avoid banner ads. The domain specification works in the same way as for --server, with the additional facility that /#/ matches any domain. Thus --address=/#/1.2.3.4 will always return 1.2.3.4 for any query not answered from /etc/hosts or DHCP and not sent to an upstream nameserver by a more specific --server directive. As for --server, one or more domains with no address returns a no-such- domain answer, so --address=/example.com/ is equivalent to --server=/example.com/ and returns NXDOMAIN for example.com and all its subdomains. An address specified as '#' translates to the NULL address of 0.0.0.0 and its IPv6 equivalent of :: so --address=/example.com/# will return NULL addresses for example.com and its subdomains. This is partly syntactic sugar for --address=/example.com/0.0.0.0 and --address=/example.com/:: but is also more efficient than including both as separate configuration lines. Note that NULL addresses normally work in the same way as localhost, so beware that clients looking up these names are likely to end up talking to themselves. Note that the behaviour for queries which don't match the specified address literal changed in version 2.86. Previous versions, configured with (eg) --address=/example.com/1.2.3.4 and then queried for a RR type other than A would return a NoData answer. From 2.86, the query is sent upstream. To restore the pre-2.86 behaviour, use the configuration --address=/example.com/1.2.3.4 --local=/example.com/ --ipset=/<domain>[/<domain>...]/<ipset>[,<ipset>...] Places the resolved IP addresses of queries for one or more domains in the specified Netfilter IP set. If multiple setnames are given, then the addresses are placed in each of them, subject to the limitations of an IP set (IPv4 addresses cannot be stored in an IPv6 IP set and vice versa). Domains and subdomains are matched in the same way as --address. These IP sets must already exist. See ipset(8) for more details. --nftset=/<domain>[/<domain>...]/[(6|4)#[<family>#]<table>#<set>[,[(6|4)#[<family>#]<table>#<set>]...] Similar to the --ipset option, but accepts one or more nftables sets to add IP addresses into. These sets must already exist. See nft(8) for more details. The family, table and set are passed directly to the nft. If the spec starts with 4# or 6# then only A or AAAA records respectively are added to the set. Since an nftset can hold only IPv4 or IPv6 addresses, this avoids errors being logged for addresses of the wrong type. --connmark-allowlist-enable[=<mask>] Enables filtering of incoming DNS queries with associated Linux connection track marks according to individual allowlists configured via a series of --connmark-allowlist options. Disallowed queries are not forwarded; they are rejected with a REFUSED error code. DNS queries are only allowed if they do not have an associated Linux connection track mark, or if the queried domains match the configured DNS patterns for the associated Linux connection track mark. If no allowlist is configured for a Linux connection track mark, all DNS queries associated with that mark are rejected. If a mask is specified, Linux connection track marks are first bitwise ANDed with the given mask before being processed. --connmark-allowlist=<connmark>[/<mask>][,<pattern>[/<pattern>...]] Configures the DNS patterns that are allowed in DNS queries associated with the given Linux connection track mark. If a mask is specified, Linux connection track marks are first bitwise ANDed with the given mask before they are compared to the given connection track mark. Patterns follow the syntax of DNS names, but additionally allow the wildcard character "*" to be used up to twice per label to match 0 or more characters within that label. Note that the wildcard never matches a dot (e.g., "*.example.com" matches "api.example.com" but not "api.us.example.com"). Patterns must be fully qualified, i.e., consist of at least two labels. The final label must not be fully numeric, and must not be the "local" pseudo-TLD. A pattern must end with at least two literal (non-wildcard) labels. Instead of a pattern, "*" can be specified to disable allowlist filtering for a given Linux connection track mark entirely. -m, --mx-host=<mx name>[[,<hostname>],<preference>] Return an MX record named <mx name> pointing to the given hostname (if given), or the host specified in the --mx-target switch or, if that switch is not given, the host on which dnsmasq is running. The default is useful for directing mail from systems on a LAN to a central server. The preference value is optional, and defaults to 1 if not given. More than one MX record may be given for a host. -t, --mx-target=<hostname> Specify the default target for the MX record returned by dnsmasq. See --mx-host. If --mx-target is given, but not --mx- host, then dnsmasq returns a MX record containing the MX target for MX queries on the hostname of the machine on which dnsmasq is running. -e, --selfmx Return an MX record pointing to itself for each local machine. Local machines are those in /etc/hosts or with DHCP leases. -L, --localmx Return an MX record pointing to the host given by --mx-target (or the machine on which dnsmasq is running) for each local machine. Local machines are those in /etc/hosts or with DHCP leases. -W, --srv-host=<_service>.<_prot>.[<domain>],[<target>[,<port>[,<priority>[,<weight>]]]] Return a SRV DNS record. See RFC2782 for details. If not supplied, the domain defaults to that given by --domain. The default for the target domain is empty, and the default for port is one and the defaults for weight and priority are zero. Be careful if transposing data from BIND zone files: the port, weight and priority numbers are in a different order. More than one SRV record for a given service/domain is allowed, all that match are returned. --host-record=<name>[,<name>....],[<IPv4-address>],[<IPv6-address>][,<TTL>] Add A, AAAA and PTR records to the DNS. This adds one or more names to the DNS with associated IPv4 (A) and IPv6 (AAAA) records. A name may appear in more than one --host-record and therefore be assigned more than one address. Only the first address creates a PTR record linking the address to the name. This is the same rule as is used reading hosts-files. --host-record options are considered to be read before host- files, so a name appearing there inhibits PTR-record creation if it appears in hosts-file also. Unlike hosts-files, names are not expanded, even when --expand-hosts is in effect. Short and long names may appear in the same --host-record, eg. --host-record=laptop,laptop.thekelleys.org,192.168.0.1,1234::100 If the time-to-live is given, it overrides the default, which is zero or the value of --local-ttl. The value is a positive integer and gives the time-to-live in seconds. --dynamic-host=<name>,[IPv4-address],[IPv6-address],<interface> Add A, AAAA and PTR records to the DNS in the same subnet as the specified interface. The address is derived from the network part of each address associated with the interface, and the host part from the specified address. For example --dynamic-host=example.com,0.0.0.8,eth0 will, when eth0 has the address 192.168.78.x and netmask 255.255.255.0 give the name example.com an A record for 192.168.78.8. The same principle applies to IPv6 addresses. Note that if an interface has more than one address, more than one A or AAAA record will be created. The TTL of the records is always zero, and any changes to interface addresses will be immediately reflected in them. -Y, --txt-record=<name>[[,<text>],<text>] Return a TXT DNS record. The value of TXT record is a set of strings, so any number may be included, delimited by commas; use quotes to put commas into a string. Note that the maximum length of a single string is 255 characters, longer strings are split into 255 character chunks. --ptr-record=<name>[,<target>] Return a PTR DNS record. --naptr-record=<name>,<order>,<preference>,<flags>,<service>,<regexp>[,<replacement>] Return an NAPTR DNS record, as specified in RFC3403. --caa-record=<name>,<flags>,<tag>,<value> Return a CAA DNS record, as specified in RFC6844. --cname=<cname>,[<cname>,]<target>[,<TTL>] Return a CNAME record which indicates that <cname> is really <target>. There is a significant limitation on the target; it must be a DNS record which is known to dnsmasq and NOT a DNS record which comes from an upstream server. The cname must be unique, but it is permissible to have more than one cname pointing to the same target. Indeed it's possible to declare multiple cnames to a target in a single line, like so: --cname=cname1,cname2,target If the time-to-live is given, it overrides the default, which is zero or the value of --local-ttl. The value is a positive integer and gives the time-to-live in seconds. --dns-rr=<name>,<RR-number>,[<hex data>] Return an arbitrary DNS Resource Record. The number is the type of the record (which is always in the C_IN class). The value of the record is given by the hex data, which may be of the form 01:23:45 or 01 23 45 or 012345 or any mixture of these. --interface-name=<name>,<interface>[/4|/6] Return DNS records associating the name with the address(es) of the given interface. This flag specifies an A or AAAA record for the given name in the same way as an /etc/hosts line, except that the address is not constant, but taken from the given interface. The interface may be followed by "/4" or "/6" to specify that only IPv4 or IPv6 addresses of the interface should be used. If the interface is down, not configured or non- existent, an empty record is returned. The matching PTR record is also created, mapping the interface address to the name. More than one name may be associated with an interface address by repeating the flag; in that case the first instance is used for the reverse address-to-name mapping. Note that a name used in --interface-name may not appear in /etc/hosts. --synth-domain=<domain>,<address range>[,<prefix>[*]] Create artificial A/AAAA and PTR records for an address range. The records either seqential numbers or the address, with periods (or colons for IPv6) replaced with dashes. An examples should make this clearer. First sequential numbers. --synth-domain=thekelleys.org.uk,192.168.0.50,192.168.0.70,internal-* results in the name internal-0.thekelleys.org.uk. returning 192.168.0.50, internal-1.thekelleys.org.uk returning 192.168.0.51 and so on. (note the *) The same principle applies to IPv6 addresses (where the numbers may be very large). Reverse lookups from address to name behave as expected. Second, --synth-domain=thekelleys.org.uk,192.168.0.0/24,internal- (no *) will result in a query for internal-192-168-0-56.thekelleys.org.uk returning 192.168.0.56 and a reverse query vice versa. The same applies to IPv6, but IPv6 addresses may start with '::' but DNS labels may not start with '-' so in this case if no prefix is configured a zero is added in front of the label. ::1 becomes 0--1. V4 mapped IPv6 addresses, which have a representation like ::ffff:1.2.3.4 are handled specially, and become like 0--ffff-1-2-3-4 The address range can be of the form <start address>,<end address> or <ip address>/<prefix-length> in both forms of the option. For IPv6 the start and end addresses must fall in the same /64 network, or prefix-length must be greater than or equal to 64 except that shorter prefix lengths than 64 are allowed only if non-sequential names are in use. --dumpfile=<path/to/file> Specify the location of a pcap-format file which dnsmasq uses to dump copies of network packets for debugging purposes. If the file exists when dnsmasq starts, it is not deleted; new packets are added to the end. --dumpmask=<mask> Specify which types of packets should be added to the dumpfile. The argument should be the OR of the bitmasks for each type of packet to be dumped: it can be specified in hex by preceding the number with 0x in the normal way. Each time a packet is written to the dumpfile, dnsmasq logs the packet sequence and the mask representing its type. The current types are: 0x0001 - DNS queries from clients, 0x0002 DNS replies to clients, 0x0004 - DNS queries to upstream, 0x0008 - DNS replies from upstream, 0x0010 - queries send upstream for DNSSEC validation, 0x0020 - replies to queries for DNSSEC validation, 0x0040 - replies to client queries which fail DNSSEC validation, 0x0080 replies to queries for DNSSEC validation which fail validation, 0x1000 - DHCPv4, 0x2000 - DHCPv6, 0x4000 - Router advertisement, 0x8000 - TFTP. --add-mac[=base64|text] Add the MAC address of the requestor to DNS queries which are forwarded upstream. This may be used to DNS filtering by the upstream server. The MAC address can only be added if the requestor is on the same subnet as the dnsmasq server. Note that the mechanism used to achieve this (an EDNS0 option) is not yet standardised, so this should be considered experimental. Also note that exposing MAC addresses in this way may have security and privacy implications. The warning about caching given for --add-subnet applies to --add-mac too. An alternative encoding of the MAC, as base64, is enabled by adding the "base64" parameter and a human-readable encoding of hex-and-colons is enabled by added the "text" parameter. --strip-mac Remove any MAC address information already in downstream queries before forwarding upstream. --add-cpe-id=<string> Add an arbitrary identifying string to DNS queries which are forwarded upstream. --add-subnet[[=[<IPv4 address>/]<IPv4 prefix length>][,[<IPv6 address>/]<IPv6 prefix length>]] Add a subnet address to the DNS queries which are forwarded upstream. If an address is specified in the flag, it will be used, otherwise, the address of the requestor will be used. The amount of the address forwarded depends on the prefix length parameter: 32 (128 for IPv6) forwards the whole address, zero forwards none of it but still marks the request so that no upstream nameserver will add client address information either. The default is zero for both IPv4 and IPv6. Note that upstream nameservers may be configured to return different results based on this information, but the dnsmasq cache does not take account. Caching is therefore disabled for such replies, unless the subnet address being added is constant. For example, --add-subnet=24,96 will add the /24 and /96 subnets of the requestor for IPv4 and IPv6 requestors, respectively. --add-subnet=1.2.3.4/24 will add 1.2.3.0/24 for IPv4 requestors and ::/0 for IPv6 requestors. --add-subnet=1.2.3.4/24,1.2.3.4/24 will add 1.2.3.0/24 for both IPv4 and IPv6 requestors. --strip-subnet Remove any subnet address already present in a downstream query before forwarding it upstream. If --add-subnet is set this also ensures that any downstream-provided subnet is replaced by the one added by dnsmasq. Otherwise, dnsmasq will NOT replace an existing subnet in the query. --umbrella[=[deviceid:<deviceid>][,orgid:<orgid>][,assetid:<id>]] Embeds the requestor's IP address in DNS queries forwarded upstream. If device id or, asset id or organization id are specified, the information is included in the forwarded queries and may be able to be used in filtering policies and reporting. The order of the id attributes is irrelevant, but they must be separated by a comma. Deviceid is a sixteen digit hexadecimal number, org and asset ids are decimal numbers. -c, --cache-size=<cachesize> Set the size of dnsmasq's cache. The default is 150 names. Setting the cache size to zero disables caching. Note: huge cache size impacts performance. -N, --no-negcache Disable negative caching. Negative caching allows dnsmasq to remember "no such domain" answers from upstream nameservers and answer identical queries without forwarding them again. --no-round-robin Dnsmasq normally permutes the order of A or AAAA records for the same name on successive queries, for load-balancing. This turns off that behaviour, so that the records are always returned in the order that they are received from upstream. --use-stale-cache[=<max TTL excess in s>] When set, if a DNS name exists in the cache, but its time-to- live has expired, dnsmasq will return the data anyway. (It attempts to refresh the data with an upstream query after returning the stale data.) This can improve speed and reliability. It comes at the expense of sometimes returning out- of-date data and less efficient cache utilisation, since old data cannot be flushed when its TTL expires, so the cache becomes mostly least-recently-used. To mitigate issues caused by massively outdated DNS replies, the maximum overaging of cached records can be specified in seconds (defaulting to not serve anything older than one day). Setting the TTL excess time to zero will serve stale cache data regardless how long it has expired. -0, --dns-forward-max=<queries> Set the maximum number of concurrent DNS queries. The default value is 150, which should be fine for most setups. The only known situation where this needs to be increased is when using web-server log file resolvers, which can generate large numbers of concurrent queries. This parameter actually controls the number of concurrent queries per server group, where a server group is the set of server(s) associated with a single domain. So if a domain has it's own server via --server=/example.com/1.2.3.4 and 1.2.3.4 is not responding, but queries for *.example.com cannot go elsewhere, then other queries will not be affected. On configurations with many such server groups and tight resources, this value may need to be reduced. --dnssec Validate DNS replies and cache DNSSEC data. When forwarding DNS queries, dnsmasq requests the DNSSEC records needed to validate the replies. The replies are validated and the result returned as the Authenticated Data bit in the DNS packet. In addition the DNSSEC records are stored in the cache, making validation by clients more efficient. Note that validation by clients is the most secure DNSSEC mode, but for clients unable to do validation, use of the AD bit set by dnsmasq is useful, provided that the network between the dnsmasq server and the client is trusted. Dnsmasq must be compiled with HAVE_DNSSEC enabled, and DNSSEC trust anchors provided, see --trust-anchor. Because the DNSSEC validation process uses the cache, it is not permitted to reduce the cache size below the default when DNSSEC is enabled. The nameservers upstream of dnsmasq must be DNSSEC-capable, ie capable of returning DNSSEC records with data. If they are not, then dnsmasq will not be able to determine the trusted status of answers and this means that DNS service will be entirely broken. --trust-anchor=[<class>],<domain>,<key-tag>,<algorithm>,<digest-type>,<digest> Provide DS records to act a trust anchors for DNSSEC validation. Typically these will be the DS record(s) for Key Signing key(s) (KSK) of the root zone, but trust anchors for limited domains are also possible. The current root-zone trust anchors may be downloaded from https://data.iana.org/root-anchors/root- anchors.xml --dnssec-check-unsigned[=no] As a default, dnsmasq checks that unsigned DNS replies are legitimate: this entails possible extra queries even for the majority of DNS zones which are not, at the moment, signed. If --dnssec-check-unsigned=no appears in the configuration, then such replies they are assumed to be valid and passed on (without the "authentic data" bit set, of course). This does not protect against an attacker forging unsigned replies for signed DNS zones, but it is fast. Versions of dnsmasq prior to 2.80 defaulted to not checking unsigned replies, and used --dnssec-check-unsigned to switch this on. Such configurations will continue to work as before, but those which used the default of no checking will need to be altered to explicitly select no checking. The new default is because switching off checking for unsigned replies is inherently dangerous. Not only does it open the possiblity of forged replies, but it allows everything to appear to be working even when the upstream namesevers do not support DNSSEC, and in this case no DNSSEC validation at all is occurring. --dnssec-no-timecheck DNSSEC signatures are only valid for specified time windows, and should be rejected outside those windows. This generates an interesting chicken-and-egg problem for machines which don't have a hardware real time clock. For these machines to determine the correct time typically requires use of NTP and therefore DNS, but validating DNS requires that the correct time is already known. Setting this flag removes the time-window checks (but not other DNSSEC validation.) only until the dnsmasq process receives SIGINT. The intention is that dnsmasq should be started with this flag when the platform determines that reliable time is not currently available. As soon as reliable time is established, a SIGINT should be sent to dnsmasq, which enables time checking, and purges the cache of DNS records which have not been thoroughly checked. Earlier versions of dnsmasq overloaded SIGHUP (which re-reads much configuration) to also enable time validation. If dnsmasq is run in debug mode (--no-daemon flag) then SIGINT retains its usual meaning of terminating the dnsmasq process. --dnssec-timestamp=<path> Enables an alternative way of checking the validity of the system time for DNSSEC (see --dnssec-no-timecheck). In this case, the system time is considered to be valid once it becomes later than the timestamp on the specified file. The file is created and its timestamp set automatically by dnsmasq. The file must be stored on a persistent filesystem, so that it and its mtime are carried over system restarts. The timestamp file is created after dnsmasq has dropped root, so it must be in a location writable by the unprivileged user that dnsmasq runs as. --proxy-dnssec Copy the DNSSEC Authenticated Data bit from upstream servers to downstream clients. This is an alternative to having dnsmasq validate DNSSEC, but it depends on the security of the network between dnsmasq and the upstream servers, and the trustworthiness of the upstream servers. Note that caching the Authenticated Data bit correctly in all cases is not technically possible. If the AD bit is to be relied upon when using this option, then the cache should be disabled using --cache-size=0. In most cases, enabling DNSSEC validation within dnsmasq is a better option. See --dnssec for details. --dnssec-debug Set debugging mode for the DNSSEC validation, set the Checking Disabled bit on upstream queries, and don't convert replies which do not validate to responses with a return code of SERVFAIL. Note that setting this may affect DNS behaviour in bad ways, it is not an extra-logging flag and should not be set in production. --auth-zone=<domain>[,<subnet>[/<prefix length>][,<subnet>[/<prefix length>].....][,exclude:<subnet>[/<prefix length>]].....] Define a DNS zone for which dnsmasq acts as authoritative server. Locally defined DNS records which are in the domain will be served. If subnet(s) are given, A and AAAA records must be in one of the specified subnets. As alternative to directly specifying the subnets, it's possible to give the name of an interface, in which case the subnets implied by that interface's configured addresses and netmask/prefix-length are used; this is useful when using constructed DHCP ranges as the actual address is dynamic and not known when configuring dnsmasq. The interface addresses may be confined to only IPv6 addresses using <interface>/6 or to only IPv4 using <interface>/4. This is useful when an interface has dynamically determined global IPv6 addresses which should appear in the zone, but RFC1918 IPv4 addresses which should not. Interface-name and address-literal subnet specifications may be used freely in the same --auth-zone declaration. It's possible to exclude certain IP addresses from responses. It can be used, to make sure that answers contain only global routeable IP addresses (by excluding loopback, RFC1918 and ULA addresses). The subnet(s) are also used to define in-addr.arpa and ip6.arpa domains which are served for reverse-DNS queries. If not specified, the prefix length defaults to 24 for IPv4 and 64 for IPv6. For IPv4 subnets, the prefix length should be have the value 8, 16 or 24 unless you are familiar with RFC 2317 and have arranged the in-addr.arpa delegation accordingly. Note that if no subnets are specified, then no reverse queries are answered. --auth-soa=<serial>[,<hostmaster>[,<refresh>[,<retry>[,<expiry>]]]] Specify fields in the SOA record associated with authoritative zones. Note that this is optional, all the values are set to sane defaults. --auth-sec-servers=<domain>[,<domain>[,<domain>...]] Specify any secondary servers for a zone for which dnsmasq is authoritative. These servers must be configured to get zone data from dnsmasq by zone transfer, and answer queries for the same authoritative zones as dnsmasq. --auth-peer=<ip-address>[,<ip-address>[,<ip-address>...]] Specify the addresses of secondary servers which are allowed to initiate zone transfer (AXFR) requests for zones for which dnsmasq is authoritative. If this option is not given but --auth-sec-servers is, then AXFR requests will be accepted from any secondary. Specifying --auth-peer without --auth-sec-servers enables zone transfer but does not advertise the secondary in NS records returned by dnsmasq. --conntrack Read the Linux connection track mark associated with incoming DNS queries and set the same mark value on upstream traffic used to answer those queries. This allows traffic generated by dnsmasq to be associated with the queries which cause it, useful for bandwidth accounting and firewalling. Dnsmasq must have conntrack support compiled in and the kernel must have conntrack support included and configured. This option cannot be combined with --query-port. -F, --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-addr>[,<end-addr>|<mode>[,<netmask>[,<broadcast>]]][,<lease time>] -F, --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-IPv6addr>[,<end-IPv6addr>|constructor:<interface>][,<mode>][,<prefix-len>][,<lease time>] Enable the DHCP server. Addresses will be given out from the range <start-addr> to <end-addr> and from statically defined addresses given in --dhcp-host options. If the lease time is given, then leases will be given for that length of time. The lease time is in seconds, or minutes (eg 45m) or hours (eg 1h) or days (2d) or weeks (1w) or "infinite". If not given, the default lease time is one hour for IPv4 and one day for IPv6. The minimum lease time is two minutes. For IPv6 ranges, the lease time maybe "deprecated"; this sets the preferred lifetime sent in a DHCP lease or router advertisement to zero, which causes clients to use other addresses, if available, for new connections as a prelude to renumbering. This option may be repeated, with different addresses, to enable DHCP service to more than one network. For directly connected networks (ie, networks on which the machine running dnsmasq has an interface) the netmask is optional: dnsmasq will determine it from the interface configuration. For networks which receive DHCP service via a relay agent, dnsmasq cannot determine the netmask itself, so it should be specified, otherwise dnsmasq will have to guess, based on the class (A, B or C) of the network address. The broadcast address is always optional. It is always allowed to have more than one --dhcp-range in a single subnet. For IPv6, the parameters are slightly different: instead of netmask and broadcast address, there is an optional prefix length which must be equal to or larger then the prefix length on the local interface. If not given, this defaults to 64. Unlike the IPv4 case, the prefix length is not automatically derived from the interface configuration. The minimum size of the prefix length is 64. IPv6 (only) supports another type of range. In this, the start address and optional end address contain only the network part (ie ::1) and they are followed by constructor:<interface>. This forms a template which describes how to create ranges, based on the addresses assigned to the interface. For instance --dhcp-range=::1,::400,constructor:eth0 will look for addresses on eth0 and then create a range from <network>::1 to <network>::400. If the interface is assigned more than one network, then the corresponding ranges will be automatically created, and then deprecated and finally removed again as the address is deprecated and then deleted. The interface name may have a final "*" wildcard. Note that just any address on eth0 will not do: it must not be an autoconfigured or privacy address, or be deprecated. If a --dhcp-range is only being used for stateless DHCP and/or SLAAC, then the address can be simply :: --dhcp-range=::,constructor:eth0 The optional set:<tag> sets an alphanumeric label which marks this network so that DHCP options may be specified on a per- network basis. When it is prefixed with 'tag:' instead, then its meaning changes from setting a tag to matching it. Only one tag may be set, but more than one tag may be matched. The optional <mode> keyword may be static which tells dnsmasq to enable DHCP for the network specified, but not to dynamically allocate IP addresses: only hosts which have static addresses given via --dhcp-host or from /etc/ethers will be served. A static-only subnet with address all zeros may be used as a "catch-all" address to enable replies to all Information-request packets on a subnet which is provided with stateless DHCPv6, ie --dhcp-range=::,static For IPv4, the <mode> may be proxy in which case dnsmasq will provide proxy-DHCP on the specified subnet. (See --pxe-prompt and --pxe-service for details.) For IPv6, the mode may be some combination of ra-only, slaac, ra-names, ra-stateless, ra-advrouter, off-link. ra-only tells dnsmasq to offer Router Advertisement only on this subnet, and not DHCP. slaac tells dnsmasq to offer Router Advertisement on this subnet and to set the A bit in the router advertisement, so that the client will use SLAAC addresses. When used with a DHCP range or static DHCP address this results in the client having both a DHCP-assigned and a SLAAC address. ra-stateless sends router advertisements with the O and A bits set, and provides a stateless DHCP service. The client will use a SLAAC address, and use DHCP for other configuration information. ra-names enables a mode which gives DNS names to dual-stack hosts which do SLAAC for IPv6. Dnsmasq uses the host's IPv4 lease to derive the name, network segment and MAC address and assumes that the host will also have an IPv6 address calculated using the SLAAC algorithm, on the same network segment. The address is pinged, and if a reply is received, an AAAA record is added to the DNS for this IPv6 address. Note that this is only happens for directly-connected networks, (not one doing DHCP via a relay) and it will not work if a host is using privacy extensions. ra-names can be combined with ra-stateless and slaac. ra-advrouter enables a mode where router address(es) rather than prefix(es) are included in the advertisements. This is described in RFC-3775 section 7.2 and is used in mobile IPv6. In this mode the interval option is also included, as described in RFC-3775 section 7.3. off-link tells dnsmasq to advertise the prefix without the on- link (aka L) bit set. -G, --dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][,tag:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore] Specify per host parameters for the DHCP server. This allows a machine with a particular hardware address to be always allocated the same hostname, IP address and lease time. A hostname specified like this overrides any supplied by the DHCP client on the machine. It is also allowable to omit the hardware address and include the hostname, in which case the IP address and lease times will apply to any machine claiming that name. For example --dhcp-host=00:20:e0:3b:13:af,wap,infinite tells dnsmasq to give the machine with hardware address 00:20:e0:3b:13:af the name wap, and an infinite DHCP lease. --dhcp-host=lap,192.168.0.199 tells dnsmasq to always allocate the machine lap the IP address 192.168.0.199. Addresses allocated like this are not constrained to be in the range given by the --dhcp-range option, but they must be in the same subnet as some valid dhcp-range. For subnets which don't need a pool of dynamically allocated addresses, use the "static" keyword in the --dhcp-range declaration. It is allowed to use client identifiers (called client DUID in IPv6-land) rather than hardware addresses to identify hosts by prefixing with 'id:'. Thus: --dhcp-host=id:01:02:03:04,..... refers to the host with client identifier 01:02:03:04. It is also allowed to specify the client ID as text, like this: --dhcp-host=id:clientidastext,..... A single --dhcp-host may contain an IPv4 address or one or more IPv6 addresses, or both. IPv6 addresses must be bracketed by square brackets thus: --dhcp-host=laptop,[1234::56] IPv6 addresses may contain only the host-identifier part: --dhcp-host=laptop,[::56] in which case they act as wildcards in constructed DHCP ranges, with the appropriate network part inserted. For IPv6, an address may include a prefix length: --dhcp-host=laptop,[1234:50/126] which (in this case) specifies four addresses, 1234::50 to 1234::53. This (an the ability to specify multiple addresses) is useful when a host presents either a consistent name or hardware-ID, but varying DUIDs, since it allows dnsmasq to honour the static address allocation but assign a different adddress for each DUID. This typically occurs when chain netbooting, as each stage of the chain gets in turn allocates an address. Note that in IPv6 DHCP, the hardware address may not be available, though it normally is for direct-connected clients, or clients using DHCP relays which support RFC 6939. For DHCPv4, the special option id:* means "ignore any client-id and use MAC addresses only." This is useful when a client presents a client-id sometimes but not others. If a name appears in /etc/hosts, the associated address can be allocated to a DHCP lease, but only if a --dhcp-host option specifying the name also exists. Only one hostname can be given in a --dhcp-host option, but aliases are possible by using CNAMEs. (See --cname ). Note that /etc/hosts is NOT used when the DNS server side of dnsmasq is disabled by setting the DNS server port to zero. More than one --dhcp-host can be associated (by name, hardware address or UID) with a host. Which one is used (and therefore which address is allocated by DHCP and appears in the DNS) depends on the subnet on which the host last obtained a DHCP lease: the --dhcp-host with an address within the subnet is used. If more than one address is within the subnet, the result is undefined. A corollary to this is that the name associated with a host using --dhcp-host does not appear in the DNS until the host obtains a DHCP lease. The special keyword "ignore" tells dnsmasq to never offer a DHCP lease to a machine. The machine can be specified by hardware address, client ID or hostname, for instance --dhcp-host=00:20:e0:3b:13:af,ignore This is useful when there is another DHCP server on the network which should be used by some machines. The set:<tag> construct sets the tag whenever this --dhcp-host directive is in use. This can be used to selectively send DHCP options just for this host. More than one tag can be set in a --dhcp-host directive (but not in other places where "set:<tag>" is allowed). When a host matches any --dhcp-host directive (or one implied by /etc/ethers) then the special tag "known" is set. This allows dnsmasq to be configured to ignore requests from unknown machines using --dhcp-ignore=tag:!known If the host matches only a --dhcp-host directive which cannot be used because it specifies an address on different subnet, the tag "known-othernet" is set. The tag:<tag> construct filters which dhcp-host directives are used; more than one can be provided, in this case the request must match all of them. Tagged directives are used in preference to untagged ones. Note that one of <hwaddr>, <client_id> or <hostname> still needs to be specified (can be a wildcard). Ethernet addresses (but not client-ids) may have wildcard bytes, so for example --dhcp-host=00:20:e0:3b:13:*,ignore will cause dnsmasq to ignore a range of hardware addresses. Note that the "*" will need to be escaped or quoted on a command line, but not in the configuration file. Hardware addresses normally match any network (ARP) type, but it is possible to restrict them to a single ARP type by preceding them with the ARP-type (in HEX) and "-". so --dhcp-host=06-00:20:e0:3b:13:af,1.2.3.4 will only match a Token-Ring hardware address, since the ARP-address type for token ring is 6. As a special case, in DHCPv4, it is possible to include more than one hardware address. eg: --dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.2 This allows an IP address to be associated with multiple hardware addresses, and gives dnsmasq permission to abandon a DHCP lease to one of the hardware addresses when another one asks for a lease. Beware that this is a dangerous thing to do, it will only work reliably if only one of the hardware addresses is active at any time and there is no way for dnsmasq to enforce this. It is, for instance, useful to allocate a stable IP address to a laptop which has both wired and wireless interfaces. --dhcp-hostsfile=<path> Read DHCP host information from the specified file. If a directory is given, then read all the files contained in that directory in alphabetical order. The file contains information about one host per line. The format of a line is the same as text to the right of '=' in --dhcp-host. The advantage of storing DHCP host information in this file is that it can be changed without re-starting dnsmasq: the file will be re-read when dnsmasq receives SIGHUP. --dhcp-optsfile=<path> Read DHCP option information from the specified file. If a directory is given, then read all the files contained in that directory in alphabetical order. The advantage of using this option is the same as for --dhcp-hostsfile: the --dhcp-optsfile will be re-read when dnsmasq receives SIGHUP. Note that it is possible to encode the information in a --dhcp-boot flag as DHCP options, using the options names bootfile-name, server-ip- address and tftp-server. This allows these to be included in a --dhcp-optsfile. --dhcp-hostsdir=<path> This is equivalent to --dhcp-hostsfile, except for the following. The path MUST be a directory, and not an individual file. Changed or new files within the directory are read automatically, without the need to send SIGHUP. If a file is deleted or changed after it has been read by dnsmasq, then the host record it contained will remain until dnsmasq receives a SIGHUP, or is restarted; ie host records are only added dynamically. The order in which the files in a directory are read is not defined. --dhcp-optsdir=<path> This is equivalent to --dhcp-optsfile, with the differences noted for --dhcp-hostsdir. -Z, --read-ethers Read /etc/ethers for information about hosts for the DHCP server. The format of /etc/ethers is a hardware address, followed by either a hostname or dotted-quad IP address. When read by dnsmasq these lines have exactly the same effect as --dhcp-host options containing the same information. /etc/ethers is re-read when dnsmasq receives SIGHUP. IPv6 addresses are NOT read from /etc/ethers. -O, --dhcp-option=[tag:<tag>,[tag:<tag>,]][encap:<opt>,][vi-encap:<enterprise>,][vendor:[<vendor-class>],][<opt>|option:<opt-name>|option6:<opt>|option6:<opt-name>],[<value>[,<value>]] Specify different or extra options to DHCP clients. By default, dnsmasq sends some standard options to DHCP clients, the netmask and broadcast address are set to the same as the host running dnsmasq, and the DNS server and default route are set to the address of the machine running dnsmasq. (Equivalent rules apply for IPv6.) If the domain name option has been set, that is sent. This configuration allows these defaults to be overridden, or other options specified. The option, to be sent may be given as a decimal number or as "option:<option-name>" The option numbers are specified in RFC2132 and subsequent RFCs. The set of option- names known by dnsmasq can be discovered by running "dnsmasq --help dhcp". For example, to set the default route option to 192.168.4.4, do --dhcp-option=3,192.168.4.4 or --dhcp-option = option:router, 192.168.4.4 and to set the time-server address to 192.168.0.4, do --dhcp-option = 42,192.168.0.4 or --dhcp-option = option:ntp-server, 192.168.0.4 The special address 0.0.0.0 is taken to mean "the address of the machine running dnsmasq". Data types allowed are comma separated dotted-quad IPv4 addresses, []-wrapped IPv6 addresses, a decimal number, colon- separated hex digits and a text string. If the optional tags are given then this option is only sent when all the tags are matched. Special processing is done on a text argument for option 119, to conform with RFC 3397. Text or dotted-quad IP addresses as arguments to option 120 are handled as per RFC 3361. Dotted-quad IP addresses which are followed by a slash and then a netmask size are encoded as described in RFC 3442. IPv6 options are specified using the option6: keyword, followed by the option number or option name. The IPv6 option name space is disjoint from the IPv4 option name space. IPv6 addresses in options must be bracketed with square brackets, eg. --dhcp-option=option6:ntp-server,[1234::56] For IPv6, [::] means "the global address of the machine running dnsmasq", whilst [fd00::] is replaced with the ULA, if it exists, and [fe80::] with the link-local address. Be careful: no checking is done that the correct type of data for the option number is sent, it is quite possible to persuade dnsmasq to generate illegal DHCP packets with injudicious use of this flag. When the value is a decimal number, dnsmasq must determine how large the data item is. It does this by examining the option number and/or the value, but can be overridden by appending a single letter flag as follows: b = one byte, s = two bytes, i = four bytes. This is mainly useful with encapsulated vendor class options (see below) where dnsmasq cannot determine data size from the option number. Option data which consists solely of periods and digits will be interpreted by dnsmasq as an IP address, and inserted into an option as such. To force a literal string, use quotes. For instance when using option 66 to send a literal IP address as TFTP server name, it is necessary to do --dhcp-option=66,"1.2.3.4" Encapsulated Vendor-class options may also be specified (IPv4 only) using --dhcp-option: for instance --dhcp-option=vendor:PXEClient,1,0.0.0.0 sends the encapsulated vendor class-specific option "mftp-address=0.0.0.0" to any client whose vendor-class matches "PXEClient". The vendor-class matching is substring based (see --dhcp-vendorclass for details). If a vendor-class option (number 60) is sent by dnsmasq, then that is used for selecting encapsulated options in preference to any sent by the client. It is possible to omit the vendorclass completely; --dhcp-option=vendor:,1,0.0.0.0 in which case the encapsulated option is always sent. Options may be encapsulated (IPv4 only) within other options: for instance --dhcp-option=encap:175, 190, iscsi-client0 will send option 175, within which is the option 190. If multiple options are given which are encapsulated with the same option number then they will be correctly combined into one encapsulated option. encap: and vendor: are may not both be set in the same --dhcp-option. The final variant on encapsulated options is "Vendor-Identifying Vendor Options" as specified by RFC3925. These are denoted like this: --dhcp-option=vi-encap:2, 10, text The number in the vi- encap: section is the IANA enterprise number used to identify this option. This form of encapsulation is supported in IPv6. The address 0.0.0.0 is not treated specially in encapsulated options. --dhcp-option-force=[tag:<tag>,[tag:<tag>,]][encap:<opt>,][vi-encap:<enterprise>,][vendor:[<vendor-class>],]<opt>,[<value>[,<value>]] This works in exactly the same way as --dhcp-option except that the option will always be sent, even if the client does not ask for it in the parameter request list. This is sometimes needed, for example when sending options to PXELinux. --dhcp-no-override (IPv4 only) Disable re-use of the DHCP servername and filename fields as extra option space. If it can, dnsmasq moves the boot server and filename information (from --dhcp-boot) out of their dedicated fields into DHCP options. This make extra space available in the DHCP packet for options but can, rarely, confuse old or broken clients. This flag forces "simple and safe" behaviour to avoid problems in such a case. --dhcp-relay=<local address>[,<server address>[#<server port>]][,<interface] Configure dnsmasq to do DHCP relay. The local address is an address allocated to an interface on the host running dnsmasq. All DHCP requests arriving on that interface will we relayed to a remote DHCP server at the server address. It is possible to relay from a single local address to multiple remote servers by using multiple --dhcp-relay configs with the same local address and different server addresses. A server address must be an IP literal address, not a domain name. If the server address is omitted, the request will be forwarded by broadcast (IPv4) or multicast (IPv6). In this case the interface must be given and not be wildcard. The server address may specify a non-standard port to relay to. If this is used then --dhcp-proxy should likely also be set, otherwise parts of the DHCP conversation which do not pass through the relay will be delivered to the wrong port. Access control for DHCP clients has the same rules as for the DHCP server, see --interface, --except-interface, etc. The optional interface name in the --dhcp-relay config has a different function: it controls on which interface DHCP replies from the server will be accepted. This is intended for configurations which have three interfaces: one being relayed from, a second connecting the DHCP server, and a third untrusted network, typically the wider internet. It avoids the possibility of spoof replies arriving via this third interface. It is allowed to have dnsmasq act as a DHCP server on one set of interfaces and relay from a disjoint set of interfaces. Note that whilst it is quite possible to write configurations which appear to act as a server and a relay on the same interface, this is not supported: the relay function will take precedence. Both DHCPv4 and DHCPv6 relay is supported. It's not possible to relay DHCPv4 to a DHCPv6 server or vice-versa. The DHCP relay function for IPv6 includes the ability to snoop prefix-delegation from relayed DHCP transactions. See --dhcp-script for details. -U, --dhcp-vendorclass=set:<tag>,[enterprise:<IANA-enterprise number>,]<vendor-class> Map from a vendor-class string to a tag. Most DHCP clients provide a "vendor class" which represents, in some sense, the type of host. This option maps vendor classes to tags, so that DHCP options may be selectively delivered to different classes of hosts. For example --dhcp-vendorclass=set:printers,Hewlett-Packard JetDirect will allow options to be set only for HP printers like so: --dhcp-option=tag:printers,3,192.168.4.4 The vendor-class string is substring matched against the vendor-class supplied by the client, to allow fuzzy matching. The set: prefix is optional but allowed for consistency. Note that in IPv6 only, vendorclasses are namespaced with an IANA-allocated enterprise number. This is given with enterprise: keyword and specifies that only vendorclasses matching the specified number should be searched. -j, --dhcp-userclass=set:<tag>,<user-class> Map from a user-class string to a tag (with substring matching, like vendor classes). Most DHCP clients provide a "user class" which is configurable. This option maps user classes to tags, so that DHCP options may be selectively delivered to different classes of hosts. It is possible, for instance to use this to set a different printer server for hosts in the class "accounts" than for hosts in the class "engineering". -4, --dhcp-mac=set:<tag>,<MAC address> Map from a MAC address to a tag. The MAC address may include wildcards. For example --dhcp-mac=set:3com,01:34:23:*:*:* will set the tag "3com" for any host whose MAC address matches the pattern. --dhcp-circuitid=set:<tag>,<circuit-id>, --dhcp-remoteid=set:<tag>,<remote-id> Map from RFC3046 relay agent options to tags. This data may be provided by DHCP relay agents. The circuit-id or remote-id is normally given as colon-separated hex, but is also allowed to be a simple string. If an exact match is achieved between the circuit or agent ID and one provided by a relay agent, the tag is set. --dhcp-remoteid (but not --dhcp-circuitid) is supported in IPv6. --dhcp-subscrid=set:<tag>,<subscriber-id> (IPv4 and IPv6) Map from RFC3993 subscriber-id relay agent options to tags. --dhcp-proxy[=<ip addr>]...... (IPv4 only) A normal DHCP relay agent is only used to forward the initial parts of a DHCP interaction to the DHCP server. Once a client is configured, it communicates directly with the server. This is undesirable if the relay agent is adding extra information to the DHCP packets, such as that used by --dhcp-circuitid and --dhcp-remoteid. A full relay implementation can use the RFC 5107 serverid-override option to force the DHCP server to use the relay as a full proxy, with all packets passing through it. This flag provides an alternative method of doing the same thing, for relays which don't support RFC 5107. Given alone, it manipulates the server-id for all interactions via relays. If a list of IP addresses is given, only interactions via relays at those addresses are affected. --dhcp-match=set:<tag>,<option number>|option:<option name>|vi-encap:<enterprise>[,<value>] Without a value, set the tag if the client sends a DHCP option of the given number or name. When a value is given, set the tag only if the option is sent and matches the value. The value may be of the form "01:ff:*:02" in which case the value must match (apart from wildcards) but the option sent may have unmatched data past the end of the value. The value may also be of the same form as in --dhcp-option in which case the option sent is treated as an array, and one element must match, so --dhcp-match=set:efi-ia32,option:client-arch,6 will set the tag "efi-ia32" if the the number 6 appears in the list of architectures sent by the client in option 93. (See RFC 4578 for details.) If the value is a string, substring matching is used. The special form with vi-encap:<enterprise number> matches against vendor-identifying vendor classes for the specified enterprise. Please see RFC 3925 for more details of these rare and interesting beasts. --dhcp-name-match=set:<tag>,<name>[*] Set the tag if the given name is supplied by a DHCP client. There may be a single trailing wildcard *, which has the usual meaning. Combined with dhcp-ignore or dhcp-ignore-names this gives the ability to ignore certain clients by name, or disallow certain hostnames from being claimed by a client. --tag-if=set:<tag>[,set:<tag>[,tag:<tag>[,tag:<tag>]]] Perform boolean operations on tags. Any tag appearing as set:<tag> is set if all the tags which appear as tag:<tag> are set, (or unset when tag:!<tag> is used) If no tag:<tag> appears set:<tag> tags are set unconditionally. Any number of set: and tag: forms may appear, in any order. --tag-if lines are executed in order, so if the tag in tag:<tag> is a tag set by another --tag-if, the line which sets the tag must precede the one which tests it. As an extension, the tag:<tag> clauses support limited wildcard matching, similar to the matching in the --interface directive. This allows, for example, using --tag-if=set:ppp,tag:ppp* to set the tag 'ppp' for all requests received on any matching interface (ppp0, ppp1, etc). This can be used in conjunction with the tag:!<tag> format meaning that no tag matching the wildcard may be set. -J, --dhcp-ignore=tag:<tag>[,tag:<tag>] When all the given tags appear in the tag set ignore the host and do not allocate it a DHCP lease. --dhcp-ignore-names[=tag:<tag>[,tag:<tag>]] When all the given tags appear in the tag set, ignore any hostname provided by the host. Note that, unlike --dhcp-ignore, it is permissible to supply no tags, in which case DHCP-client supplied hostnames are always ignored, and DHCP hosts are added to the DNS using only --dhcp-host configuration in dnsmasq and the contents of /etc/hosts and /etc/ethers. --dhcp-generate-names=tag:<tag>[,tag:<tag>] (IPv4 only) Generate a name for DHCP clients which do not otherwise have one, using the MAC address expressed in hex, separated by dashes. Note that if a host provides a name, it will be used by preference to this, unless --dhcp-ignore-names is set. --dhcp-broadcast[=tag:<tag>[,tag:<tag>]] (IPv4 only) When all the given tags appear in the tag set, always use broadcast to communicate with the host when it is unconfigured. It is permissible to supply no tags, in which case this is unconditional. Most DHCP clients which need broadcast replies set a flag in their requests so that this happens automatically, some old BOOTP clients do not. -M, --dhcp-boot=[tag:<tag>,]<filename>,[<servername>[,<server address>|<tftp_servername>]] (IPv4 only) Set BOOTP options to be returned by the DHCP server. Server name and address are optional: if not provided, the name is left empty, and the address set to the address of the machine running dnsmasq. If dnsmasq is providing a TFTP service (see --enable-tftp ) then only the filename is required here to enable network booting. If the optional tag(s) are given, they must match for this configuration to be sent. Instead of an IP address, the TFTP server address can be given as a domain name which is looked up in /etc/hosts. This name can be associated in /etc/hosts with multiple IP addresses, which are used round- robin. This facility can be used to load balance the tftp load among a set of servers. --dhcp-sequential-ip Dnsmasq is designed to choose IP addresses for DHCP clients using a hash of the client's MAC address. This normally allows a client's address to remain stable long-term, even if the client sometimes allows its DHCP lease to expire. In this default mode IP addresses are distributed pseudo-randomly over the entire available address range. There are sometimes circumstances (typically server deployment) where it is more convenient to have IP addresses allocated sequentially, starting from the lowest available address, and setting this flag enables this mode. Note that in the sequential mode, clients which allow a lease to expire are much more likely to move IP address; for this reason it should not be generally used. --dhcp-ignore-clid Dnsmasq is reading 'client identifier' (RFC 2131) option sent by clients (if available) to identify clients. This allow to serve same IP address for a host using several interfaces. Use this option to disable 'client identifier' reading, i.e. to always identify a host using the MAC address. --pxe-service=[tag:<tag>,]<CSA>,<menu text>[,<basename>|<bootservicetype>][,<server address>|<server_name>] Most uses of PXE boot-ROMS simply allow the PXE system to obtain an IP address and then download the file specified by --dhcp-boot and execute it. However the PXE system is capable of more complex functions when supported by a suitable DHCP server. This specifies a boot option which may appear in a PXE boot menu. <CSA> is client system type, only services of the correct type will appear in a menu. The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86, Intel_Lean_Client, IA32_EFI, x86-64_EFI, Xscale_EFI, BC_EFI, ARM32_EFI and ARM64_EFI; an integer may be used for other types. The parameter after the menu text may be a file name, in which case dnsmasq acts as a boot server and directs the PXE client to download the file by TFTP, either from itself ( --enable-tftp must be set for this to work) or another TFTP server if the final server address/name is given. Note that the "layer" suffix (normally ".0") is supplied by PXE, and need not be added to the basename. Alternatively, the basename may be a filename, complete with suffix, in which case no layer suffix is added. If an integer boot service type, rather than a basename is given, then the PXE client will search for a suitable boot service for that type on the network. This search may be done by broadcast, or direct to a server if its IP address/name is provided. If no boot service type or filename is provided (or a boot service type of 0 is specified) then the menu entry will abort the net boot procedure and continue booting from local media. The server address can be given as a domain name which is looked up in /etc/hosts. This name can be associated in /etc/hosts with multiple IP addresses, which are used round-robin. --pxe-prompt=[tag:<tag>,]<prompt>[,<timeout>] Setting this provides a prompt to be displayed after PXE boot. If the timeout is given then after the timeout has elapsed with no keyboard input, the first available menu option will be automatically executed. If the timeout is zero then the first available menu item will be executed immediately. If --pxe-prompt is omitted the system will wait for user input if there are multiple items in the menu, but boot immediately if there is only one. See --pxe-service for details of menu items. Dnsmasq supports PXE "proxy-DHCP", in this case another DHCP server on the network is responsible for allocating IP addresses, and dnsmasq simply provides the information given in --pxe-prompt and --pxe-service to allow netbooting. This mode is enabled using the proxy keyword in --dhcp-range. --dhcp-pxe-vendor=<vendor>[,...] According to UEFI and PXE specifications, DHCP packets between PXE clients and proxy PXE servers should have PXEClient in their vendor-class field. However, the firmware of computers from a few vendors is customized to carry a different identifier in that field. This option is used to consider such identifiers valid for identifying PXE clients. For instance --dhcp-pxe-vendor=PXEClient,HW-Client will enable dnsmasq to also provide proxy PXE service to those PXE clients with HW-Client in as their identifier. -X, --dhcp-lease-max=<number> Limits dnsmasq to the specified maximum number of DHCP leases. The default is 1000. This limit is to prevent DoS attacks from hosts which create thousands of leases and use lots of memory in the dnsmasq process. -K, --dhcp-authoritative Should be set when dnsmasq is definitely the only DHCP server on a network. For DHCPv4, it changes the behaviour from strict RFC compliance so that DHCP requests on unknown leases from unknown hosts are not ignored. This allows new hosts to get a lease without a tedious timeout under all circumstances. It also allows dnsmasq to rebuild its lease database without each client needing to reacquire a lease, if the database is lost. For DHCPv6 it sets the priority in replies to 255 (the maximum) instead of 0 (the minimum). --dhcp-rapid-commit Enable DHCPv4 Rapid Commit Option specified in RFC 4039. When enabled, dnsmasq will respond to a DHCPDISCOVER message including a Rapid Commit option with a DHCPACK including a Rapid Commit option and fully committed address and configuration information. Should only be enabled if either the server is the only server for the subnet, or multiple servers are present and they each commit a binding for all clients. --dhcp-alternate-port[=<server port>[,<client port>]] (IPv4 only) Change the ports used for DHCP from the default. If this option is given alone, without arguments, it changes the ports used for DHCP from 67 and 68 to 1067 and 1068. If a single argument is given, that port number is used for the server and the port number plus one used for the client. Finally, two port numbers allows arbitrary specification of both server and client ports for DHCP. -3, --bootp-dynamic[=<network-id>[,<network-id>]] (IPv4 only) Enable dynamic allocation of IP addresses to BOOTP clients. Use this with care, since each address allocated to a BOOTP client is leased forever, and therefore becomes permanently unavailable for re-use by other hosts. if this is given without tags, then it unconditionally enables dynamic allocation. With tags, only when the tags are all set. It may be repeated with different tag sets. -5, --no-ping (IPv4 only) By default, the DHCP server will attempt to ensure that an address is not in use before allocating it to a host. It does this by sending an ICMP echo request (aka "ping") to the address in question. If it gets a reply, then the address must already be in use, and another is tried. This flag disables this check. Use with caution. --log-dhcp Extra logging for DHCP: log all the options sent to DHCP clients and the tags used to determine them. --quiet-dhcp, --quiet-dhcp6, --quiet-ra, --quiet-tftp Suppress logging of the routine operation of these protocols. Errors and problems will still be logged. --quiet-tftp does not consider file not found to be an error. --quiet-dhcp and quiet- dhcp6 are over-ridden by --log-dhcp. -l, --dhcp-leasefile=<path> Use the specified file to store DHCP lease information. --dhcp-duid=<enterprise-id>,<uid> (IPv6 only) Specify the server persistent UID which the DHCPv6 server will use. This option is not normally required as dnsmasq creates a DUID automatically when it is first needed. When given, this option provides dnsmasq the data required to create a DUID-EN type DUID. Note that once set, the DUID is stored in the lease database, so to change between DUID-EN and automatically created DUIDs or vice-versa, the lease database must be re-initialised. The enterprise-id is assigned by IANA, and the uid is a string of hex octets unique to a particular device. -6 --dhcp-script=<path> Whenever a new DHCP lease is created, or an old one destroyed, or a TFTP file transfer completes, the executable specified by this option is run. <path> must be an absolute pathname, no PATH search occurs. The arguments to the process are "add", "old" or "del", the MAC address of the host (or DUID for IPv6) , the IP address, and the hostname, if known. "add" means a lease has been created, "del" means it has been destroyed, "old" is a notification of an existing lease when dnsmasq starts or a change to MAC address or hostname of an existing lease (also, lease length or expiry and client-id, if --leasefile-ro is set and lease expiry if --script-on-renewal is set). If the MAC address is from a network type other than ethernet, it will have the network type prepended, eg "06-01:23:45:67:89:ab" for token ring. The process is run as root (assuming that dnsmasq was originally run as root) even if dnsmasq is configured to change UID to an unprivileged user. The environment is inherited from the invoker of dnsmasq, with some or all of the following variables added For both IPv4 and IPv6: DNSMASQ_DOMAIN if the fully-qualified domain name of the host is known, this is set to the domain part. (Note that the hostname passed to the script as an argument is never fully-qualified.) If the client provides a hostname, DNSMASQ_SUPPLIED_HOSTNAME If the client provides user-classes, DNSMASQ_USER_CLASS0..DNSMASQ_USER_CLASSn If dnsmasq was compiled with HAVE_BROKEN_RTC, then the length of the lease (in seconds) is stored in DNSMASQ_LEASE_LENGTH, otherwise the time of lease expiry is stored in DNSMASQ_LEASE_EXPIRES. The number of seconds until lease expiry is always stored in DNSMASQ_TIME_REMAINING. DNSMASQ_DATA_MISSING is set to "1" during "old" events for existing leases generated at startup to indicate that data not stored in the persistent lease database will not be present. This comprises everything other than IP address, hostname, MAC address, DUID, IAID and lease length or expiry time. If a lease used to have a hostname, which is removed, an "old" event is generated with the new state of the lease, ie no name, and the former name is provided in the environment variable DNSMASQ_OLD_HOSTNAME. DNSMASQ_INTERFACE stores the name of the interface on which the request arrived; this is not set for "old" actions when dnsmasq restarts. DNSMASQ_RELAY_ADDRESS is set if the client used a DHCP relay to contact dnsmasq and the IP address of the relay is known. DNSMASQ_TAGS contains all the tags set during the DHCP transaction, separated by spaces. DNSMASQ_LOG_DHCP is set if --log-dhcp is in effect. DNSMASQ_REQUESTED_OPTIONS a string containing the decimal values in the Parameter Request List option, comma separated, if the parameter request list option is provided by the client. DNSMASQ_MUD_URL the Manufacturer Usage Description URL if provided by the client. (See RFC8520 for details.) For IPv4 only: DNSMASQ_CLIENT_ID if the host provided a client-id. DNSMASQ_CIRCUIT_ID, DNSMASQ_SUBSCRIBER_ID, DNSMASQ_REMOTE_ID if a DHCP relay-agent added any of these options. If the client provides vendor-class, DNSMASQ_VENDOR_CLASS. For IPv6 only: If the client provides vendor-class, DNSMASQ_VENDOR_CLASS_ID, containing the IANA enterprise id for the class, and DNSMASQ_VENDOR_CLASS0..DNSMASQ_VENDOR_CLASSn for the data. DNSMASQ_SERVER_DUID containing the DUID of the server: this is the same for every call to the script. DNSMASQ_IAID containing the IAID for the lease. If the lease is a temporary allocation, this is prefixed to 'T'. DNSMASQ_MAC containing the MAC address of the client, if known. Note that the supplied hostname, vendorclass and userclass data is only supplied for "add" actions or "old" actions when a host resumes an existing lease, since these data are not held in dnsmasq's lease database. All file descriptors are closed except stdin, which is open to /dev/null, and stdout and stderr which capture output for logging by dnsmasq. (In debug mode, stdio, stdout and stderr file are left as those inherited from the invoker of dnsmasq). The script is not invoked concurrently: at most one instance of the script is ever running (dnsmasq waits for an instance of script to exit before running the next). Changes to the lease database are which require the script to be invoked are queued awaiting exit of a running instance. If this queueing allows multiple state changes occur to a single lease before the script can be run then earlier states are discarded and the current state of that lease is reflected when the script finally runs. At dnsmasq startup, the script will be invoked for all existing leases as they are read from the lease file. Expired leases will be called with "del" and others with "old". When dnsmasq receives a HUP signal, the script will be invoked for existing leases with an "old" event. There are five further actions which may appear as the first argument to the script, "init", "arp-add", "arp-del", "relay- snoop" and "tftp". More may be added in the future, so scripts should be written to ignore unknown actions. "init" is described below in --leasefile-ro The "tftp" action is invoked when a TFTP file transfer completes: the arguments are the file size in bytes, the address to which the file was sent, and the complete pathname of the file. The "relay-snoop" action is invoked when dnsmasq is configured as a DHCP relay for DHCPv6 and it relays a prefx delegation to a client. The arguments are the name of the interface where the client is conected, its (link-local) address on that interface and the delegated prefix. This information is sufficient to install routes to the delegated prefix of a router. See --dhcp-relay for more details on configuring DHCP relay. The "arp-add" and "arp-del" actions are only called if enabled with --script-arp They are are supplied with a MAC address and IP address as arguments. "arp-add" indicates the arrival of a new entry in the ARP or neighbour table, and "arp-del" indicates the deletion of same. --dhcp-luascript=<path> Specify a script written in Lua, to be run when leases are created, destroyed or changed. To use this option, dnsmasq must be compiled with the correct support. The Lua interpreter is initialised once, when dnsmasq starts, so that global variables persist between lease events. The Lua code must define a lease function, and may provide init and shutdown functions, which are called, without arguments when dnsmasq starts up and terminates. It may also provide a tftp function. The lease function receives the information detailed in --dhcp-script. It gets two arguments, firstly the action, which is a string containing, "add", "old" or "del", and secondly a table of tag value pairs. The tags mostly correspond to the environment variables detailed above, for instance the tag "domain" holds the same data as the environment variable DNSMASQ_DOMAIN. There are a few extra tags which hold the data supplied as arguments to --dhcp-script. These are mac_address, ip_address and hostname for IPv4, and client_duid, ip_address and hostname for IPv6. The tftp function is called in the same way as the lease function, and the table holds the tags destination_address, file_name and file_size. The arp and arp-old functions are called only when enabled with --script-arp and have a table which holds the tags mac_address and client_address. --dhcp-scriptuser Specify the user as which to run the lease-change script or Lua script. This defaults to root, but can be changed to another user using this flag. --script-arp Enable the "arp" and "arp-old" functions in the --dhcp-script and --dhcp-luascript. -9, --leasefile-ro Completely suppress use of the lease database file. The file will not be created, read, or written. Change the way the lease- change script (if one is provided) is called, so that the lease database may be maintained in external storage by the script. In addition to the invocations given in --dhcp-script the lease- change script is called once, at dnsmasq startup, with the single argument "init". When called like this the script should write the saved state of the lease database, in dnsmasq leasefile format, to stdout and exit with zero exit code. Setting this option also forces the leasechange script to be called on changes to the client-id and lease length and expiry time. --script-on-renewal Call the DHCP script when the lease expiry time changes, for instance when the lease is renewed. --bridge-interface=<interface>,<alias>[,<alias>] Treat DHCP (v4 and v6) requests and IPv6 Router Solicit packets arriving at any of the <alias> interfaces as if they had arrived at <interface>. This option allows dnsmasq to provide DHCP and RA service over unaddressed and unbridged Ethernet interfaces, e.g. on an OpenStack compute host where each such interface is a TAP interface to a VM, or as in "old style bridging" on BSD platforms. A trailing '*' wildcard can be used in each <alias>. It is permissible to add more than one alias using more than one --bridge-interface option since --bridge- interface=int1,alias1,alias2 is exactly equivalent to --bridge- interface=int1,alias1 --bridge-interface=int1,alias2 --shared-network=<interface>,<addr> --shared-network=<addr>,<addr> The DHCP server determines which DHCP ranges are useable for allocating an address to a DHCP client based on the network from which the DHCP request arrives, and the IP configuration of the server's interface on that network. The shared-network option extends the available subnets (and therefore DHCP ranges) beyond the subnets configured on the arrival interface. The first argument is either the name of an interface, or an address that is configured on a local interface, and the second argument is an address which defines another subnet on which addresses can be allocated. To be useful, there must be a suitable dhcp-range which allows address allocation on this subnet and this dhcp-range MUST include the netmask. Using shared-network also needs extra consideration of routing. Dnsmasq does not have the usual information that it uses to determine the default route, so the default route option (or other routing) MUST be configured manually. The client must have a route to the server: if the two-address form of shared-network is used, this needs to be to the first specified address. If the interface,address form is used, there must be a route to all of the addresses configured on the interface. The two-address form of shared-network is also usable with a DHCP relay: the first address is the address of the relay and the second, as before, specifies an extra subnet which addresses may be allocated from. -s, --domain=<domain>[[,<address range>[,local]]|<interface>] Specifies DNS domains for the DHCP server. Domains may be be given unconditionally (without the IP range) or for limited IP ranges. This has two effects; firstly it causes the DHCP server to return the domain to any hosts which request it, and secondly it sets the domain which it is legal for DHCP-configured hosts to claim. The intention is to constrain hostnames so that an untrusted host on the LAN cannot advertise its name via DHCP as e.g. "microsoft.com" and capture traffic not meant for it. If no domain suffix is specified, then any DHCP hostname with a domain part (ie with a period) will be disallowed and logged. If suffix is specified, then hostnames with a domain part are allowed, provided the domain part matches the suffix. In addition, when a suffix is set then hostnames without a domain part have the suffix added as an optional domain part. Eg on my network I can set --domain=thekelleys.org.uk and have a machine whose DHCP hostname is "laptop". The IP address for that machine is available from dnsmasq both as "laptop" and "laptop.thekelleys.org.uk". If the domain is given as "#" then the domain is read from the first "search" directive in /etc/resolv.conf (or equivalent). The address range can be of the form <ip address>,<ip address> or <ip address>/<netmask> or just a single <ip address>. See --dhcp-fqdn which can change the behaviour of dnsmasq with domains. If the address range is given as ip-address/network-size, then a additional flag "local" may be supplied which has the effect of adding --local declarations for forward and reverse DNS queries. Eg. --domain=thekelleys.org.uk,192.168.0.0/24,local is identical to --domain=thekelleys.org.uk,192.168.0.0/24 --local=/thekelleys.org.uk/ --local=/0.168.192.in-addr.arpa/ The address range can also be given as a network interface name, in which case all of the subnets currently assigned to the interface are used in matching the address. This allows hosts on different physical subnets to be given different domains in a way which updates automatically as the interface addresses change. --dhcp-fqdn In the default mode, dnsmasq inserts the unqualified names of DHCP clients into the DNS. For this reason, the names must be unique, even if two clients which have the same name are in different domains. If a second DHCP client appears which has the same name as an existing client, the name is transferred to the new client. If --dhcp-fqdn is set, this behaviour changes: the unqualified name is no longer put in the DNS, only the qualified name. Two DHCP clients with the same name may both keep the name, provided that the domain part is different (ie the fully qualified names differ.) To ensure that all names have a domain part, there must be at least --domain without an address specified when --dhcp-fqdn is set. --dhcp-client-update Normally, when giving a DHCP lease, dnsmasq sets flags in the FQDN option to tell the client not to attempt a DDNS update with its name and IP address. This is because the name-IP pair is automatically added into dnsmasq's DNS view. This flag suppresses that behaviour, this is useful, for instance, to allow Windows clients to update Active Directory servers. See RFC 4702 for details. --enable-ra Enable dnsmasq's IPv6 Router Advertisement feature. DHCPv6 doesn't handle complete network configuration in the same way as DHCPv4. Router discovery and (possibly) prefix discovery for autonomous address creation are handled by a different protocol. When DHCP is in use, only a subset of this is needed, and dnsmasq can handle it, using existing DHCP configuration to provide most data. When RA is enabled, dnsmasq will advertise a prefix for each --dhcp-range, with default router as the relevant link-local address on the machine running dnsmasq. By default, the "managed address" bits are set, and the "use SLAAC" bit is reset. This can be changed for individual subnets with the mode keywords described in --dhcp-range. RFC6106 DNS parameters are included in the advertisements. By default, the relevant link-local address of the machine running dnsmasq is sent as recursive DNS server. If provided, the DHCPv6 options dns-server and domain-search are used for the DNS server (RDNSS) and the domain search list (DNSSL). --ra-param=<interface>,[mtu:<integer>|<interface>|off,][high,|low,]<ra-interval>[,<router lifetime>] Set non-default values for router advertisements sent via an interface. The priority field for the router may be altered from the default of medium with eg --ra-param=eth0,high. The interval between router advertisements may be set (in seconds) with --ra-param=eth0,60. The lifetime of the route may be changed or set to zero, which allows a router to advertise prefixes but not a route via itself. --ra-param=eth0,0,0 (A value of zero for the interval means the default value.) All four parameters may be set at once. --ra-param=eth0,mtu:1280,low,60,1200 The interface field may include a wildcard. The mtu: parameter may be an arbitrary interface name, in which case the MTU value for that interface is used. This is useful for (eg) advertising the MTU of a WAN interface on the other interfaces of a router. --dhcp-reply-delay=[tag:<tag>,]<integer> Delays sending DHCPOFFER and PROXYDHCP replies for at least the specified number of seconds. This can be used as workaround for bugs in PXE boot firmware that does not function properly when receiving an instant reply. This option takes into account the time already spent waiting (e.g. performing ping check) if any. --enable-tftp[=<interface>[,<interface>]] Enable the TFTP server function. This is deliberately limited to that needed to net-boot a client. Only reading is allowed; the tsize and blksize extensions are supported (tsize is only supported in octet mode). Without an argument, the TFTP service is provided to the same set of interfaces as DHCP service. If the list of interfaces is provided, that defines which interfaces receive TFTP service. --tftp-root=<directory>[,<interface>] Look for files to transfer using TFTP relative to the given directory. When this is set, TFTP paths which include ".." are rejected, to stop clients getting outside the specified root. Absolute paths (starting with /) are allowed, but they must be within the tftp-root. If the optional interface argument is given, the directory is only used for TFTP requests via that interface. --tftp-no-fail Do not abort startup if specified tftp root directories are inaccessible. --tftp-unique-root[=ip|mac] Add the IP or hardware address of the TFTP client as a path component on the end of the TFTP-root. Only valid if a --tftp- root is set and the directory exists. Defaults to adding IP address (in standard dotted-quad format). For instance, if --tftp-root is "/tftp" and client 1.2.3.4 requests file "myfile" then the effective path will be "/tftp/1.2.3.4/myfile" if /tftp/1.2.3.4 exists or /tftp/myfile otherwise. When "=mac" is specified it will append the MAC address instead, using lowercase zero padded digits separated by dashes, e.g.: 01-02-03-04-aa-bb Note that resolving MAC addresses is only possible if the client is in the local network or obtained a DHCP lease from us. --tftp-secure Enable TFTP secure mode: without this, any file which is readable by the dnsmasq process under normal unix access-control rules is available via TFTP. When the --tftp-secure flag is given, only files owned by the user running the dnsmasq process are accessible. If dnsmasq is being run as root, different rules apply: --tftp-secure has no effect, but only files which have the world-readable bit set are accessible. It is not recommended to run dnsmasq as root with TFTP enabled, and certainly not without specifying --tftp-root. Doing so can expose any world- readable file on the server to any host on the net. --tftp-lowercase Convert filenames in TFTP requests to all lowercase. This is useful for requests from Windows machines, which have case- insensitive filesystems and tend to play fast-and-loose with case in filenames. Note that dnsmasq's tftp server always converts "\" to "/" in filenames. --tftp-max=<connections> Set the maximum number of concurrent TFTP connections allowed. This defaults to 50. When serving a large number of TFTP connections, per-process file descriptor limits may be encountered. Dnsmasq needs one file descriptor for each concurrent TFTP connection and one file descriptor per unique file (plus a few others). So serving the same file simultaneously to n clients will use require about n + 10 file descriptors, serving different files simultaneously to n clients will require about (2*n) + 10 descriptors. If --tftp-port-range is given, that can affect the number of concurrent connections. --tftp-mtu=<mtu size> Use size as the ceiling of the MTU supported by the intervening network when negotiating TFTP blocksize, overriding the MTU setting of the local interface if it is larger. --tftp-no-blocksize Stop the TFTP server from negotiating the "blocksize" option with a client. Some buggy clients request this option but then behave badly when it is granted. --tftp-port-range=<start>,<end> A TFTP server listens on a well-known port (69) for connection initiation, but it also uses a dynamically-allocated port for each connection. Normally these are allocated by the OS, but this option specifies a range of ports for use by TFTP transfers. This can be useful when TFTP has to traverse a firewall. The start of the range cannot be lower than 1025 unless dnsmasq is running as root. The number of concurrent TFTP connections is limited by the size of the port range. --tftp-single-port Run in a mode where the TFTP server uses ONLY the well-known port (69) for its end of the TFTP transfer. This allows TFTP to work when there in NAT is the path between client and server. Note that this is not strictly compliant with the RFCs specifying the TFTP protocol: use at your own risk. -C, --conf-file=<file> Specify a configuration file. The presence of this option stops dnsmasq from reading the default configuration file (normally /opt/homebrew/etc/dnsmasq.conf). Multiple files may be specified by repeating the option either on the command line or in configuration files. A filename of "-" causes dnsmasq to read configuration from stdin. -7, --conf-dir=<directory>[,<file-extension>......], Read all the files in the given directory as configuration files. If extension(s) are given, any files which end in those extensions are skipped. Any files whose names end in ~ or start with . or start and end with # are always skipped. If the extension starts with * then only files which have that extension are loaded. So --conf-dir=/path/to/dir,*.conf loads all files with the suffix .conf in /path/to/dir. This flag may be given on the command line or in a configuration file. If giving it on the command line, be sure to escape * characters. Files are loaded in alphabetical order of filename. --servers-file=<file> A special case of --conf-file which differs in two respects. Firstly, only --server and --rev-server are allowed in the configuration file included. Secondly, the file is re-read and the configuration therein is updated when dnsmasq receives SIGHUP. --conf-script=<file>[ <arg] Execute <file>, and treat what it emits to stdout as the contents of a configuration file. If the script exits with a non-zero exit code, dnsmasq treats this as a fatal error. The script can be passed arguments, space seperated from the filename and each other so, for instance --conf-dir="/etc/dnsmasq-uncompress-ads /share/ads-domains.gz" with /etc/dnsmasq-uncompress-ads containing set -e zcat ${1} | sed -e "s:^:address=/:" -e "s:$:/:" exit 0 and /share/ads-domains.gz containing a compressed list of ad server domains will save disk space with large ad-server blocklists. --no-ident Do not respond to class CHAOS and type TXT in domain bind queries. Without this option being set, the cache statistics are also available in the DNS as answers to queries of class CHAOS and type TXT in domain bind. The domain names are cachesize.bind, insertions.bind, evictions.bind, misses.bind, hits.bind, auth.bind and servers.bind unless disabled at compile-time. An example command to query this, using the dig utility would be dig +short chaos txt cachesize.bind CONFIG FILE At startup, dnsmasq reads /opt/homebrew/etc/dnsmasq.conf, if it exists. (On FreeBSD, the file is /usr/local/opt/homebrew/etc/dnsmasq.conf ) (but see the --conf-file and --conf-dir options.) The format of this file consists of one option per line, exactly as the long options detailed in the OPTIONS section but without the leading "--". Lines starting with # are comments and ignored. For options which may only be specified once, the configuration file overrides the command line. Quoting is allowed in a config file: between " quotes the special meanings of ,:. and # are removed and the following escapes are allowed: \\ \" \t \e \b \r and \n. The later corresponding to tab, escape, backspace, return and newline. NOTES When it receives a SIGHUP, dnsmasq clears its cache and then re-loads /etc/hosts and /etc/ethers and any file given by --dhcp-hostsfile, --dhcp-hostsdir, --dhcp-optsfile, --dhcp-optsdir, --addn-hosts or --hostsdir. The DHCP lease change script is called for all existing DHCP leases. If --no-poll is set SIGHUP also re-reads /etc/resolv.conf. SIGHUP does NOT re-read the configuration file. When it receives a SIGUSR1, dnsmasq writes statistics to the system log. It writes the cache size, the number of names which have had to removed from the cache before they expired in order to make room for new names and the total number of names that have been inserted into the cache. The number of cache hits and misses and the number of authoritative queries answered are also given. For each upstream server it gives the number of queries sent, and the number which resulted in an error. In --no-daemon mode or when full logging is enabled (--log- queries), a complete dump of the contents of the cache is made. When it receives SIGUSR2 and it is logging direct to a file (see --log-facility ) dnsmasq will close and reopen the log file. Note that during this operation, dnsmasq will not be running as root. When it first creates the logfile dnsmasq changes the ownership of the file to the non-root user it will run as. Logrotate should be configured to create a new log file with the ownership which matches the existing one before sending SIGUSR2. If TCP DNS queries are in progress, the old logfile will remain open in child processes which are handling TCP queries and may continue to be written. There is a limit of 150 seconds, after which all existing TCP processes will have expired: for this reason, it is not wise to configure logfile compression for logfiles which have just been rotated. Using logrotate, the required options are create and delaycompress. Dnsmasq is a DNS query forwarder: it is not capable of recursively answering arbitrary queries starting from the root servers but forwards such queries to a fully recursive upstream DNS server which is typically provided by an ISP. By default, dnsmasq reads /etc/resolv.conf to discover the IP addresses of the upstream nameservers it should use, since the information is typically stored there. Unless --no-poll is used, dnsmasq checks the modification time of /etc/resolv.conf (or equivalent if --resolv-file is used) and re- reads it if it changes. This allows the DNS servers to be set dynamically by PPP or DHCP since both protocols provide the information. Absence of /etc/resolv.conf is not an error since it may not have been created before a PPP connection exists. Dnsmasq simply keeps checking in case /etc/resolv.conf is created at any time. Dnsmasq can be told to parse more than one resolv.conf file. This is useful on a laptop, where both PPP and DHCP may be used: dnsmasq can be set to poll both /opt/homebrew/etc/dnsmasq.d/ppp/resolv.conf and /opt/homebrew/etc/dnsmasq.d/dhcpc/resolv.conf and will use the contents of whichever changed last, giving automatic switching between DNS servers. Upstream servers may also be specified on the command line or in the configuration file. These server specifications optionally take a domain name which tells dnsmasq to use that server only to find names in that particular domain. In order to configure dnsmasq to act as cache for the host on which it is running, put "nameserver 127.0.0.1" in /etc/resolv.conf to force local processes to send queries to dnsmasq. Then either specify the upstream servers directly to dnsmasq using --server options or put their addresses real in another file, say /etc/resolv.dnsmasq and run dnsmasq with the --resolv-file /etc/resolv.dnsmasq option. This second technique allows for dynamic update of the server addresses by PPP or DHCP. Addresses in /etc/hosts will "shadow" different addresses for the same names in the upstream DNS, so "mycompany.com 1.2.3.4" in /etc/hosts will ensure that queries for "mycompany.com" always return 1.2.3.4 even if queries in the upstream DNS would otherwise return a different address. There is one exception to this: if the upstream DNS contains a CNAME which points to a shadowed name, then looking up the CNAME through dnsmasq will result in the unshadowed address associated with the target of the CNAME. To work around this, add the CNAME to /etc/hosts so that the CNAME is shadowed too. The tag system works as follows: For each DHCP request, dnsmasq collects a set of valid tags from active configuration lines which include set:<tag>, including one from the --dhcp-range used to allocate the address, one from any matching --dhcp-host (and "known" or "known- othernet" if a --dhcp-host matches) The tag "bootp" is set for BOOTP requests, and a tag whose name is the name of the interface on which the request arrived is also set. Any configuration lines which include one or more tag:<tag> constructs will only be valid if all that tags are matched in the set derived above. Typically this is --dhcp-option. --dhcp-option which has tags will be used in preference to an untagged --dhcp-option, provided that _all_ the tags match somewhere in the set collected as described above. The prefix '!' on a tag means 'not' so --dhcp- option=tag:!purple,3,1.2.3.4 sends the option when the tag purple is not in the set of valid tags. (If using this in a command line rather than a configuration file, be sure to escape !, which is a shell metacharacter) When selecting --dhcp-options, a tag from --dhcp-range is second class relative to other tags, to make it easy to override options for individual hosts, so --dhcp-range=set:interface1,...... --dhcp-host=set:myhost,..... --dhcp-option=tag:interface1,option:nis-domain,"domain1" --dhcp-option=tag:myhost,option:nis-domain,"domain2" will set the NIS- domain to domain1 for hosts in the range, but override that to domain2 for a particular host. Note that for --dhcp-range both tag:<tag> and set:<tag> are allowed, to both select the range in use based on (eg) --dhcp-host, and to affect the options sent, based on the range selected. This system evolved from an earlier, more limited one and for backward compatibility "net:" may be used instead of "tag:" and "set:" may be omitted. (Except in --dhcp-host, where "net:" may be used instead of "set:".) For the same reason, '#' may be used instead of '!' to indicate NOT. The DHCP server in dnsmasq will function as a BOOTP server also, provided that the MAC address and IP address for clients are given, either using --dhcp-host configurations or in /etc/ethers , and a --dhcp-range configuration option is present to activate the DHCP server on a particular network. (Setting --bootp-dynamic removes the need for static address mappings.) The filename parameter in a BOOTP request is used as a tag, as is the tag "bootp", allowing some control over the options returned to different classes of hosts. AUTHORITATIVE CONFIGURATION Configuring dnsmasq to act as an authoritative DNS server is complicated by the fact that it involves configuration of external DNS servers to provide delegation. We will walk through three scenarios of increasing complexity. Prerequisites for all of these scenarios are a globally accessible IP address, an A or AAAA record pointing to that address, and an external DNS server capable of doing delegation of the zone in question. For the first part of this explanation, we will call the A (or AAAA) record for the globally accessible address server.example.com, and the zone for which dnsmasq is authoritative our.zone.com. The simplest configuration consists of two lines of dnsmasq configuration; something like --auth-server=server.example.com,eth0 --auth-zone=our.zone.com,1.2.3.0/24 and two records in the external DNS server.example.com A 192.0.43.10 our.zone.com NS server.example.com eth0 is the external network interface on which dnsmasq is listening, and has (globally accessible) address 192.0.43.10. Note that the external IP address may well be dynamic (ie assigned from an ISP by DHCP or PPP) If so, the A record must be linked to this dynamic assignment by one of the usual dynamic-DNS systems. A more complex, but practically useful configuration has the address record for the globally accessible IP address residing in the authoritative zone which dnsmasq is serving, typically at the root. Now we have --auth-server=our.zone.com,eth0 --auth-zone=our.zone.com,1.2.3.0/24 our.zone.com A 1.2.3.4 our.zone.com NS our.zone.com The A record for our.zone.com has now become a glue record, it solves the chicken-and-egg problem of finding the IP address of the nameserver for our.zone.com when the A record is within that zone. Note that this is the only role of this record: as dnsmasq is now authoritative from our.zone.com it too must provide this record. If the external address is static, this can be done with an /etc/hosts entry or --host-record. --auth-server=our.zone.com,eth0 --host-record=our.zone.com,1.2.3.4 --auth-zone=our.zone.com,1.2.3.0/24 If the external address is dynamic, the address associated with our.zone.com must be derived from the address of the relevant interface. This is done using --interface-name Something like: --auth-server=our.zone.com,eth0 --interface-name=our.zone.com,eth0 --auth-zone=our.zone.com,1.2.3.0/24,eth0 (The "eth0" argument in --auth-zone adds the subnet containing eth0's dynamic address to the zone, so that the --interface-name returns the address in outside queries.) Our final configuration builds on that above, but also adds a secondary DNS server. This is another DNS server which learns the DNS data for the zone by doing zones transfer, and acts as a backup should the primary server become inaccessible. The configuration of the secondary is beyond the scope of this man-page, but the extra configuration of dnsmasq is simple: --auth-sec-servers=secondary.myisp.com and our.zone.com NS secondary.myisp.com Adding auth-sec-servers enables zone transfer in dnsmasq, to allow the secondary to collect the DNS data. If you wish to restrict this data to particular hosts then --auth-peer=<IP address of secondary> will do so. Dnsmasq acts as an authoritative server for in-addr.arpa and ip6.arpa domains associated with the subnets given in --auth-zone declarations, so reverse (address to name) lookups can be simply configured with a suitable NS record, for instance in this example, where we allow 1.2.3.0/24 addresses. 3.2.1.in-addr.arpa NS our.zone.com Note that at present, reverse (in-addr.arpa and ip6.arpa) zones are not available in zone transfers, so there is no point arranging secondary servers for reverse lookups. When dnsmasq is configured to act as an authoritative server, the following data is used to populate the authoritative zone. --mx-host, --srv-host, --dns-rr, --txt-record, --naptr-record, --caa-record, as long as the record names are in the authoritative domain. --synth-domain as long as the domain is in the authoritative zone and, for reverse (PTR) queries, the address is in the relevant subnet. --cname as long as the record name is in the authoritative domain. If the target of the CNAME is unqualified, then it is qualified with the authoritative zone name. CNAME used in this way (only) may be wildcards, as in --cname=*.example.com,default.example.com IPv4 and IPv6 addresses from /etc/hosts (and --addn-hosts ) and --host-record and --interface-name and ---dynamic-host provided the address falls into one of the subnets specified in the --auth-zone. Addresses of DHCP leases, provided the address falls into one of the subnets specified in the --auth-zone. (If constructed DHCP ranges are is use, which depend on the address dynamically assigned to an interface, then the form of --auth-zone which defines subnets by the dynamic address of an interface should be used to ensure this condition is met.) In the default mode, where a DHCP lease has an unqualified name, and possibly a qualified name constructed using --domain then the name in the authoritative zone is constructed from the unqualified name and the zone's domain. This may or may not equal that specified by --domain. If --dhcp-fqdn is set, then the fully qualified names associated with DHCP leases are used, and must match the zone's domain. EXIT CODES 0 - Dnsmasq successfully forked into the background, or terminated normally if backgrounding is not enabled. 1 - A problem with configuration was detected. 2 - A problem with network access occurred (address in use, attempt to use privileged ports without permission). 3 - A problem occurred with a filesystem operation (missing file/directory, permissions). 4 - Memory allocation failure. 5 - Other miscellaneous problem. 11 or greater - a non zero return code was received from the lease- script process "init" call or a --conf-script file. The exit code from dnsmasq is the script's exit code with 10 added. LIMITS The default values for resource limits in dnsmasq are generally conservative, and appropriate for embedded router type devices with slow processors and limited memory. On more capable hardware, it is possible to increase the limits, and handle many more clients. The following applies to dnsmasq-2.37: earlier versions did not scale as well. Dnsmasq is capable of handling DNS and DHCP for at least a thousand clients. The DHCP lease times should not be very short (less than one hour). The value of --dns-forward-max can be increased: start with it equal to the number of clients and increase if DNS seems slow. Note that DNS performance depends too on the performance of the upstream nameservers. The size of the DNS cache may be increased: the hard limit is 10000 names and the default (150) is very low. Sending SIGUSR1 to dnsmasq makes it log information which is useful for tuning the cache size. See the NOTES section for details. The built-in TFTP server is capable of many simultaneous file transfers: the absolute limit is related to the number of file-handles allowed to a process and the ability of the select() system call to cope with large numbers of file handles. If the limit is set too high using --tftp-max it will be scaled down and the actual limit logged at start-up. Note that more transfers are possible when the same file is being sent than when each transfer sends a different file. It is possible to use dnsmasq to block Web advertising by using a list of known banner-ad servers, all resolving to 127.0.0.1 or 0.0.0.0, in /etc/hosts or an additional hosts file. The list can be very long, dnsmasq has been tested successfully with one million names. That size file needs a 1GHz processor and about 60Mb of RAM. INTERNATIONALISATION Dnsmasq can be compiled to support internationalisation. To do this, the make targets "all-i18n" and "install-i18n" should be used instead of the standard targets "all" and "install". When internationalisation is compiled in, dnsmasq will produce log messages in the local language and support internationalised domain names (IDN). Domain names in /etc/hosts, /etc/ethers and /opt/homebrew/etc/dnsmasq.conf which contain non-ASCII characters will be translated to the DNS-internal punycode representation. Note that dnsmasq determines both the language for messages and the assumed charset for configuration files from the LANG environment variable. This should be set to the system default value by the script which is responsible for starting dnsmasq. When editing the configuration files, be careful to do so using only the system-default locale and not user-specific one, since dnsmasq has no direct way of determining the charset in use, and must assume that it is the system default. FILES /opt/homebrew/etc/dnsmasq.conf /usr/local/opt/homebrew/etc/dnsmasq.conf /etc/resolv.conf /var/run/dnsmasq/resolv.conf /opt/homebrew/etc/dnsmasq.d/ppp/resolv.conf /opt/homebrew/etc/dnsmasq.d/dhcpc/resolv.conf /etc/hosts /etc/ethers /opt/homebrew/var/lib/misc/dnsmasq/dnsmasq.leases /var/db/dnsmasq.leases /opt/homebrew/var/run/dnsmasq/dnsmasq.pid SEE ALSO hosts(5), resolver(5) AUTHOR This manual page was written by Simon Kelley <simon@thekelleys.org.uk>. 2021-08-16 DNSMASQ(8)
| null |
prlexec
|
The prlexec utility is used to execute various text commands in Parallels Desktop virtual machines (VMs).
|
prlexec - utility for executing commands in virtual machines.
|
prlexec [--vm <vm_id|vm_name>] [--user <user>] [--password <password>] command
|
--vm <vm_id|vm_name> Specifies the virtual machine in which the command is executed. The virtual machine is specified either by id or name. vm_id is the virtual machine UUID. You can find the UUID of a VM by executing the prlctl list command. --user <user> Specifies which user the command is executed under. --password <password> Provides the password for the current logged-in user or the user specified with the --user argument. command Command to run. USAGE By default, the command is executed in the currently running virtual machine under the currently logged-in user. If there are two or more virtual machines running at the same time, you must specify the virtual machine you need with the --vm argument, either by the virtual machine id or name. If the virtual machine is not running at the moment, it will start and then the command will execute. You can also specify a user, password or both using the corresponding arguments. Windows VMs command argument MUST NOT be enclosed in quotes. If you enclose a command in quotes, the command most likely will not work. If you want to pass quotes (or other symbols having special meaning for your OS X shell) within the command, don't forget to escape them. See the EXAMPLES section for an example. Linux and Mac OS VMs command can safely be enclosed in quotes. In Linux virtual machines, a user is considered logged in when he/she has an active X session. If a user doesn't have an active X session (for example, on server versions of Linux), the --user and --password (if the password it set) arguments must be specified. If you want to run an X11 application, you must set the DISPLAY and XAUTHORITY variables. See the EXAMPLES section for an example.
|
Run calc.exe in a Windows VM when only one VM is currently running: prlexec calc.exe Open file "note.txt" in Notepad in a specific Windows VM: prlexec --vm "WinVM" notepad.exe note.txt Get the contents of directory "C:\" in a Windows VM (note the escaping): prlexec --vm "WinVM" cmd /c dir C:\\ Pass a complex command to a Windows VM: prlexec --vm "WinVM" cmd /c dir C:\\ \& dir C:\\Users Run script "backup.sh" as user "admin" with password "foobar" on the virtual machine called "linux-server": prlexec --vm "linux-server" --user admin --password foobar ~/backup.sh View the contents of the /etc/shadow file as user "root" (password is not required): prlexec --vm "linux-server" --user root cat /etc/shadow Run xterm in a Linux virtual machine with X11. Don't forget the "&" character at the end of the line. Without the "&" character, prlexec will wait for the application to quit: prlexec --vm "linux-desktop" "DISPLAY=:0 XAUTHORITY=~/.Xauthority xterm &" SEE ALSO prlctl(8) COPYRIGHT Copyright (C) 2021 Parallels International GmbH. All rights reserved. Parallels Desktop 15 January 2016 prlexec(8)
|
prl_disk_tool
|
The prl_disk_tool utility is used to manage Parallels virtual disks and to prepare native partitions to boot into Parallels virtual machines. COMMANDS create Creates a new virtual hard disk. resize Changes the capacity of the specified virtual disk. During resizing, all data present on the disk volumes are left intact. You can also resize the last partition using the --resize_partition option. The supported file systems are NTFS, FAT 16/32, and ext2/ext3. compact Removes all empty blocks from expanding Parallels virtual disks and reduces their size on your real disk. Compacting is performed by scanning file systems for unused clusters and cleaning the corresponding disk blocks. The supported file systems are NTFS, FAT16/32, ext2/ext3. You can also try to compact disks with unsupported file system types using the --buildmap option. merge Merges all snapshots of the virtual hard disk. validate Validates the operating system on the virtual hard disk. configure Prepares a disk or real Boot Camp partition for booting into a Parallels virtual machine. convert Converts the virtual hard disk into another format. encrypt Encrypts data on the specified virtual hard disk image. decrypt Decrypts data on the specified virtual hard disk.
|
prl_disk_tool - utility for managing Parallels virtual machine disks.
|
prl_disk_tool [--help] <COMMAND> [OPTIONS] --hdd <disk_name> prl_disk_tool create --hdd <disk_name> --size <size>[M|G|T] [--expanding] [--split] [--split-size <size>[M|G|T]] [--block-size <size>[M|G|T]] prl_disk_tool create -p,--physical --hdd <disk_name> --ext-disk-path <external_disk_name> prl_disk_tool create --hdd <disk_name> --dmg <dmg_name> prl_disk_tool resize --size <size>[M|G|T] [--resize_partition] --hdd <disk_name> [--split] [--force] [--force-hybrid-shutdown] prl_disk_tool resize -i,--info [--units <K|M|G|T>] --hdd <disk_name> prl_disk_tool compact --hdd <disk_name> [-a, --all-leafs] [-x, --exclude <uid>] [--exclude-pagefile] [--buildmap] [--force] prl_disk_tool compact -i,--info --hdd <disk_name> [-a, --all-leafs] [-x, --exclude <uid>] [--buildmap] [--details] prl_disk_tool merge --hdd <disk_name> prl_disk_tool validate --hdd <disk_name> prl_disk_tool configure --hdd <disk_name> [--para <paravirt_driver>] [--boot <boot_driver>] [--toolsag <tools_install_helper>] [--mbrfile <mbr_file_path>] [--force] prl_disk_tool convert --hdd <disk_name> <[--extend]|[--expanding|--plain]|[--split|--merge]> prl_disk_tool convert -c,--current --hdd <disk_name> prl_disk_tool convert -i,--info --hdd <disk_name> prl_disk_tool encrypt --hdd <disk_name> --salt <salt> | --no-salt [--force] prl_disk_tool decrypt --hdd <disk_name> prl_disk_tool --help
|
Common options: The following options can be used with the majority of prl_disk_tool commands. --hdd <disk_name> This option is mandatory and specifies the full path to the disk to be configured or compacted. --password-type <plain|hashed|no> The way caller specifies a password for ecnrypted disk. --loglevel Set logging level --json Write output information in JSON format. Disk creation: create --hdd <disk_name> --size <size>[M|G|T] [--expanding] [--split] [--split-size <size>[M|G|T]] [--block-size <size>[M|G|T]] Creates a disk image. --expanding Reduce the size of a plain disk to the actual amount of data stored on it and make it expandable allowing it to grow in size as the amount of data grows. --split Split the virtual hard disk by 2 GB. --split-size <size>[M|G|T] Forces chunk size for the --split option in MB (by default), GB or TB. --block-size <size>[M|G|T] Forces the block size of expanding disks in MB (by default), GB or TB. create -p,--physical --hdd <disk_name> --ext-disk-path <external_disk_name> Creates a disk image on the external physical drive. -p,--physical Create disk image on the external physical drive. --ext-disk-path <external_disk_name> This option is mandatory if -p,--physical is defined and specifies the full path to the external physical drive. create --hdd <disk_name> --dmg <dmg_name> Creates a virtual hard disk (.hdd) on the basis of a .dmg disk image file. --dmg <dmg_name> This option is mandatory when a virtual hard disk is created on the basis of a .dmg disk image file and specifies the full path to an existing .dmg file. Disk resizing: resize --size <size>[M|G|T] [--resize_partition] --hdd <disk_name> [--split] [--force] [--force-hybrid-shutdown] Resizes disk image. --size <size>[M|G|T] Set the virtual hard disk size in MB (by default), GB or TB. --resize_partition Resize the last partition and its file system while resizing the disk. The supported file system types are NTFS, FAT16/32, ext2/ext3. --split Split the virtual hard disk by 2 GB. --force Forcibly drop the suspended state before resizing the disk. --force-hybrid-shutdown Ignore shutdownState inside disks if vm is in Hybrid Shutdown state. resize -i,--info [--units <K|M|G|T>] --hdd <disk_name> Gets information about the disk capacity and its file size without resizing it. -i,--info Display the capacity of the specified virtual disk as it is seen from inside the virtual machine or Container, without resizing the disk. The information is shown as a table with the following columns: Size: <size>M The current virtual disk capacity. Minimum: <size>M The minimum possible capacity of the virtual disk after resizing the disk using the --resize_partition option. Minimum: <size>M (without resizing the last partition) The minimum possible capacity of the virtual disk after resizing the disk without using the --resize_partition option. Keep in mind that for an expanding virtual disk the capacity shown from inside the virtual machine and the size the disk occupies on the real physical disk may differ. --units <K|M|G|T> Used with the --info option, shows the disk size in KB, MB, GB or TB. Disk compacting: compact --hdd <disk_name> [-a, --all-leafs] [-x, --exclude <uid>] [--exclude-pagefile] [--buildmap] [--force] Compacts the disk image by removing unused sectors. -a, --all-leafs Estimate compact for all snapshot leafs. -x, --exclude <uid> Skip snapshot leafs with specified uid. --buildmap If this option is specified, the utility scans the specified disk for empty blocks one by one and removes all blocks filled with zeroes. --exclude-pagefile If this option is specified, the utility will remove the page file from the disk while compacting it. Do nothing if --buildmap option is used. --force Forcibly drop the suspended state before resizing the disk. compact -i,--info --hdd <disk_name> [-a, --all-leafs] [-x, --exclude <uid>] [--buildmap] [--details] Shows the estimated disk size after the compaction without compacting the disk. -i,--info Show the estimated disk size after the compaction without compacting the disk. The results will be shown as: Block size: <size> Block size, in sectors. Each sector is 512 bytes. Total blocks: <sectors_count> Total blocks in the disk image (according to the virtual disk image capacity). Allocated blocks: <sectors_count> The number of blocks that are actually allocated to and keeping space on your hard drive. Used blocks: <sectors_count> The number of blocks actually used in the disk image. This number of blocks will be left after compacting the disk. -a, --all-leafs Estimate compact for all snapshot leafs. -x, --exclude <uid> Skip snapshot leafs with specified uid. --buildmap If this option is specified, the utility scans the specified disk for empty blocks one by one and removes all blocks filled with zeroes. --details Add the compact details section to the JSON output. Configuration: configure --hdd <disk_name> [--para <paravirt_driver>] [--boot <boot_driver>] [--toolsag <tools_install_helper>] [--mbrfile <mbr_file_path>] [--force] Configures the operating system on the virtual hard disk. --para <paravirt_driver> Specifies the full path to the Parallels paravirtualization driver. --boot <boot_driver> Specifies the full path to the Parallels boot driver. --toolsag <tools_install_helper> Specifies the full path to the PTIAgent.exe file used to configure Boot Camp virtual machines. --mbrfile <mbr_file_path> Specifies the full path to file with MBR boot manager code. --force Forcibly configure Boot Camp even if it was configured in the previous version. Conversion convert --hdd <disk_name> <[--extend]|[--expanding|--plain]|[--split|--merge]> Converts the virtual hard disk into another format or change the way the data is organized. --extend Convert an expandable disk to support disk with size more than 2TB (current limit for expanded disk) --expanding Reduce the size of a plain disk to the actual amount of data stored on it and make it expandable allowing it to grow in size as the amount of data grows. --plain Convert an expandable disk to a disk of fixed capacity that cannot grow in size. --split Split the data stored on the virtual hard disk into smaller parts of 2 GB each, and improve the virtual machine performance. --merge Merge all parts of a split disk into one file. convert -c,--current --hdd <disk_name> Converts the virtual hard disk to the latest disk format. -c,--current Convert an old Parallels disk to the latest disk format. convert -i,--info --hdd <disk_name> Shows information about the virtual hard disk. -i, --info Show information about the virtual hard disk. Encryption encrypt --hdd <disk_name> --salt <salt> | --no-salt [--force] Encrypts data on the specified virtual hard disk image. --salt <salt> Parameter to make a disk key from a plain password in a new way (since PD17). Salt can be found in the configuration of Parallels Virtual Machine (config.pvs) in 'Encryption::Salt' field. --no-salt Forces utility to use an old logic to make a disk key from a plain password(PD16 and older). --force Forcibly encrypt the virtual hard disk even when it is already encrypted (It changes a disk key in that case). Other: --help, --usage Print usage. AUTHOR Parallels International GmbH. http://www.parallels.com SEE ALSO prlctl(8) COPYRIGHT Copyright (C) 2021 Parallels International GmbH. All rights reserved. Parallels Desktop 30 June 2021 prl_disk_tool(8)
| null |
wkhtmltopdf
|
Converts one or more HTML pages into a PDF document, using wkhtmltopdf patched qt. Global Options --collate Collate when printing multiple copies --no-collate Do not collate when printing multiple copies --cookie-jar <path> Read and write cookies from and to the supplied cookie jar file --copies <number> Number of copies to print into the pdf file -d, --dpi <dpi> Change the dpi explicitly (this has no effect on X11 based systems) -H, --extended-help Display more extensive help, detailing less common command switches -g, --grayscale PDF will be generated in grayscale -h, --help Display help --htmldoc Output program html help --image-dpi <integer> When embedding images scale them down to this dpi --image-quality <integer> When jpeg compressing images use this quality --license Output license information and exit --log-level <level> Set log level to: none, error, warn or info -l, --lowquality Generates lower quality pdf/ps. Useful to shrink the result document space --manpage Output program man page -B, --margin-bottom <unitreal> Set the page bottom margin -L, --margin-left <unitreal> Set the page left margin -R, --margin-right <unitreal> Set the page right margin -T, --margin-top <unitreal> Set the page top margin -O, --orientation <orientation> Set orientation to Landscape or Portrait --page-height <unitreal> Page height -s, --page-size <Size> Set paper size to: A4, Letter, etc. --page-width <unitreal> Page width --no-pdf-compression Do not use lossless compression on pdf objects -q, --quiet Be less verbose, maintained for backwards compatibility; Same as using --log-level none --read-args-from-stdin Read command line arguments from stdin --readme Output program readme --title <text> The title of the generated pdf file (The title of the first document is used if not specified) --use-xserver Use the X server (some plugins and other stuff might not work without X11) -V, --version Output version information and exit Outline Options --dump-default-toc-xsl Dump the default TOC xsl style sheet to stdout --dump-outline <file> Dump the outline to a file --outline Put an outline into the pdf --no-outline Do not put an outline into the pdf --outline-depth <level> Set the depth of the outline Page Options --allow <path> Allow the file or files from the specified folder to be loaded (repeatable) --background Do print background --no-background Do not print background --bypass-proxy-for <value> Bypass proxy for host (repeatable) --cache-dir <path> Web cache directory --checkbox-checked-svg <path> Use this SVG file when rendering checked checkboxes --checkbox-svg <path> Use this SVG file when rendering unchecked checkboxes --cookie <name> <value> Set an additional cookie (repeatable), value should be url encoded. --custom-header <name> <value> Set an additional HTTP header (repeatable) --custom-header-propagation Add HTTP headers specified by --custom-header for each resource request. --no-custom-header-propagation Do not add HTTP headers specified by --custom-header for each resource request. --debug-javascript Show javascript debugging output --no-debug-javascript Do not show javascript debugging output --default-header Add a default header, with the name of the page to the left, and the page number to the right, this is short for: --header-left='[webpage]' --header-right='[page]/[toPage]' --top 2cm --header-line --encoding <encoding> Set the default text encoding, for input --disable-external-links Do not make links to remote web pages --enable-external-links Make links to remote web pages --disable-forms Do not turn HTML form fields into pdf form fields --enable-forms Turn HTML form fields into pdf form fields --images Do load or print images --no-images Do not load or print images --disable-internal-links Do not make local links --enable-internal-links Make local links -n, --disable-javascript Do not allow web pages to run javascript --enable-javascript Do allow web pages to run javascript --javascript-delay <msec> Wait some milliseconds for javascript finish --keep-relative-links Keep relative external links as relative external links --load-error-handling <handler> Specify how to handle pages that fail to load: abort, ignore or skip --load-media-error-handling <handler> Specify how to handle media files that fail to load: abort, ignore or skip --disable-local-file-access Do not allowed conversion of a local file to read in other local files, unless explicitly allowed with --allow --enable-local-file-access Allowed conversion of a local file to read in other local files. --minimum-font-size <int> Minimum font size --exclude-from-outline Do not include the page in the table of contents and outlines --include-in-outline Include the page in the table of contents and outlines --page-offset <offset> Set the starting page number --password <password> HTTP Authentication password --disable-plugins Disable installed plugins --enable-plugins Enable installed plugins (plugins will likely not work) --post <name> <value> Add an additional post field (repeatable) --post-file <name> <path> Post an additional file (repeatable) --print-media-type Use print media-type instead of screen --no-print-media-type Do not use print media-type instead of screen -p, --proxy <proxy> Use a proxy --proxy-hostname-lookup Use the proxy for resolving hostnames --radiobutton-checked-svg <path> Use this SVG file when rendering checked radiobuttons --radiobutton-svg <path> Use this SVG file when rendering unchecked radiobuttons --resolve-relative-links Resolve relative external links into absolute links --run-script <js> Run this additional javascript after the page is done loading (repeatable) --disable-smart-shrinking Disable the intelligent shrinking strategy used by WebKit that makes the pixel/dpi ratio non-constant --enable-smart-shrinking Enable the intelligent shrinking strategy used by WebKit that makes the pixel/dpi ratio non-constant --ssl-crt-path <path> Path to the ssl client cert public key in OpenSSL PEM format, optionally followed by intermediate ca and trusted certs --ssl-key-password <password> Password to ssl client cert private key --ssl-key-path <path> Path to ssl client cert private key in OpenSSL PEM format --stop-slow-scripts Stop slow running javascripts --no-stop-slow-scripts Do not Stop slow running javascripts --disable-toc-back-links Do not link from section header to toc --enable-toc-back-links Link from section header to toc --user-style-sheet <path> Specify a user style sheet, to load with every page --username <username> HTTP Authentication username --viewport-size <> Set viewport size if you have custom scrollbars or css attribute overflow to emulate window size --window-status <windowStatus> Wait until window.status is equal to this string before rendering page --zoom <float> Use this zoom factor Headers And Footer Options --footer-center <text> Centered footer text --footer-font-name <name> Set footer font name --footer-font-size <size> Set footer font size --footer-html <url> Adds a html footer --footer-left <text> Left aligned footer text --footer-line Display line above the footer --no-footer-line Do not display line above the footer --footer-right <text> Right aligned footer text --footer-spacing <real> Spacing between footer and content in mm --header-center <text> Centered header text --header-font-name <name> Set header font name --header-font-size <size> Set header font size --header-html <url> Adds a html header --header-left <text> Left aligned header text --header-line Display line below the header --no-header-line Do not display line below the header --header-right <text> Right aligned header text --header-spacing <real> Spacing between header and content in mm --replace <name> <value> Replace [name] with value in header and footer (repeatable) TOC Options --disable-dotted-lines Do not use dotted lines in the toc --toc-header-text <text> The header text of the toc --toc-level-indentation <width> For each level of headings in the toc indent by this length --disable-toc-links Do not link from toc to sections --toc-text-size-shrink <real> For each level of headings in the toc the font is scaled by this factor --xsl-style-sheet <file> Use the supplied xsl style sheet for printing the table of contents Specifying A Proxy By default proxy information will be read from the environment variables: proxy, all_proxy and http_proxy, proxy options can also by specified with the -p switch <type> := "http://" | "socks5://" <serif> := <username> (":" <password>)? "@" <proxy> := "None" | <type>? <string>? <host> (":" <port>)? Here are some examples (In case you are unfamiliar with the BNF): http://user:password@myproxyserver:8080 socks5://myproxyserver None Footers And Headers Headers and footers can be added to the document by the --header-* and --footer* arguments respectively. In header and footer text string supplied to e.g. --header-left, the following variables will be substituted. * [page] Replaced by the number of the pages currently being printed * [frompage] Replaced by the number of the first page to be printed * [topage] Replaced by the number of the last page to be printed * [webpage] Replaced by the URL of the page being printed * [section] Replaced by the name of the current section * [subsection] Replaced by the name of the current subsection * [date] Replaced by the current date in system local format * [isodate] Replaced by the current date in ISO 8601 extended format * [time] Replaced by the current time in system local format * [title] Replaced by the title of the of the current page object * [doctitle] Replaced by the title of the output document * [sitepage] Replaced by the number of the page in the current site being converted * [sitepages] Replaced by the number of pages in the current site being converted As an example specifying --header-right "Page [page] of [topage]", will result in the text "Page x of y" where x is the number of the current page and y is the number of the last page, to appear in the upper left corner in the document. Headers and footers can also be supplied with HTML documents. As an example one could specify --header-html header.html, and use the following content in header.html: <!DOCTYPE html> <html><head><script> function subst() { var vars = {}; var query_strings_from_url = document.location.search.substring(1).split('&'); for (var query_string in query_strings_from_url) { if (query_strings_from_url.hasOwnProperty(query_string)) { var temp_var = query_strings_from_url[query_string].split('=', 2); vars[temp_var[0]] = decodeURI(temp_var[1]); } } var css_selector_classes = ['page', 'frompage', 'topage', 'webpage', 'section', 'subsection', 'date', 'isodate', 'time', 'title', 'doctitle', 'sitepage', 'sitepages']; for (var css_class in css_selector_classes) { if (css_selector_classes.hasOwnProperty(css_class)) { var element = document.getElementsByClassName(css_selector_classes[css_class]); for (var j = 0; j < element.length; ++j) { element[j].textContent = vars[css_selector_classes[css_class]]; } } } } </script></head><body style="border:0; margin: 0;" onload="subst()"> <table style="border-bottom: 1px solid black; width: 100%"> <tr> <td class="section"></td> <td style="text-align:right"> Page <span class="page"></span> of <span class="topage"></span> </td> </tr> </table> </body></html> As can be seen from the example, the arguments are sent to the header/footer html documents in get fashion. Outlines Wkhtmltopdf with patched qt has support for PDF outlines also known as book marks, this can be enabled by specifying the --outline switch. The outlines are generated based on the <h?> tags, for a in-depth description of how this is done see the Table Of Contents section. The outline tree can sometimes be very deep, if the <h?> tags where spread to generous in the HTML document. The --outline-depth switch can be used to bound this. Table Of Contents A table of contents can be added to the document by adding a toc object to the command line. For example: wkhtmltopdf toc https://qt-project.org/doc/qt-4.8/qstring.html qstring.pdf The table of contents is generated based on the H tags in the input documents. First a XML document is generated, then it is converted to HTML using XSLT. The generated XML document can be viewed by dumping it to a file using the --dump-outline switch. For example: wkhtmltopdf --dump-outline toc.xml https://qt-project.org/doc/qt-4.8/qstring.html qstring.pdf The XSLT document can be specified using the --xsl-style-sheet switch. For example: wkhtmltopdf toc --xsl-style-sheet my.xsl https://qt-project.org/doc/qt-4.8/qstring.html qstring.pdf The --dump-default-toc-xsl switch can be used to dump the default XSLT style sheet to stdout. This is a good start for writing your own style sheet wkhtmltopdf --dump-default-toc-xsl The XML document is in the namespace "http://wkhtmltopdf.org/outline" it has a root node called "outline" which contains a number of "item" nodes. An item can contain any number of item. These are the outline subsections to the section the item represents. A item node has the following attributes: * "title" the name of the section. * "page" the page number the section occurs on. * "link" a URL that links to the section. * "backLink" the name of the anchor the section will link back to. The remaining TOC options only affect the default style sheet so they will not work when specifying a custom style sheet. Page sizes The default page size of the rendered document is A4, but by using the --page-size option this can be changed to almost anything else, such as: A3, Letter and Legal. For a full list of supported pages sizes please see <https://qt-project.org/doc/qt-4.8/qprinter.html#PaperSize- enum>. For a more fine grained control over the page size the --page-height and --page-width options may be used Reading arguments from stdin If you need to convert a lot of pages in a batch, and you feel that wkhtmltopdf is a bit too slow to start up, then you should try --read-args-from-stdin, When --read-args-from-stdin each line of input sent to wkhtmltopdf on stdin will act as a separate invocation of wkhtmltopdf, with the arguments specified on the given line combined with the arguments given to wkhtmltopdf For example one could do the following: echo "https://qt-project.org/doc/qt-4.8/qapplication.html qapplication.pdf" >> cmds echo "cover google.com https://en.wikipedia.org/wiki/Qt_(software) qt.pdf" >> cmds wkhtmltopdf --read-args-from-stdin --book < cmds Page Breaking The current page breaking algorithm of WebKit leaves much to be desired. Basically WebKit will render everything into one long page, and then cut it up into pages. This means that if you have two columns of text where one is vertically shifted by half a line. Then WebKit will cut a line into to pieces display the top half on one page. And the bottom half on another page. It will also break image in two and so on. If you are using the patched version of QT you can use the CSS page-break-inside property to remedy this somewhat. There is no easy solution to this problem, until this is solved try organizing your HTML documents such that it contains many lines on which pages can be cut cleanly. Contact If you experience bugs or want to request new features please visit <https://wkhtmltopdf.org/support.html> Authors Jakob Truelsen <antialize@gmail.com> Ashish Kulkarni <ashish@kulkarni.dev> Jan Habermann <jan@habermann24.com> Pablo Ruiz García <pablo.ruiz@gmail.com> Trevor North <trevor@blubolt.com> Nate Pinchot <nate.pinchot@gmail.com> pussbb <pussbb@gmail.com> Aaron Stone <aaron@serendipity.cx> Patrick Widauer @a-ctor Peter van der Tak <pta@ibuildgreen.eu> Benjamin Sinkula <bsinky@gmail.com> Kasper F. Brandt <poizan@poizan.dk> Michael Nitze <michael.nitze@online.de> Rok Dvojmoc <rok.dvojmoc@gmail.com> theirix <theirix@gmail.com> Tomsgu <tomasjakll@gmail.com> Artem Butusov <art.sormy@gmail.com> Christian Sciberras <uuf6429@gmail.com> Daniel M. Lambea <dmlambea@gmail.com> Douglas Bagnall <douglas@paradise.net.nz> peterrehm <peter.rehm@renvest.de> Renan Gonçalves <renan.saddam@gmail.com> Ruslan Grabovoy <kudgo.test@gmail.com> Sander Kleykens <sander.kleykens@avnu.be> Adam Thorsen <adam.thorsen@gmail.com> Albin Kerouanton <albin.kerouanton@knplabs.com> Alejandro Dubrovsky <alito@organicrobot.com> Arthur Cinader @acinader Benoit Garret <benoit.garret@gmail.com> Bill Kuker <bkuker@billkuker.com> cptjazz <alexander@jesner.eu> daigot <daigot@rayze.com> Destan Sarpkaya @destan Duncan Smart <duncan.smart@gmail.com> Emil Lerch <emil@lerch.org> Erik Hyrkas <erik.hyrkas@thomsonreuters.com> Erling Linde <erlingwl@gmail.com> Fábio C. Barrionuevo da Luz <bnafta@gmail.com> Fr33m1nd <lukion@gmx.de> Frank Groeneveld <frank@frankgroeneveld.nl> Immanuel Häussermann <haeussermann@gmail.com> Jake Petroules <jake.petroules@petroules.com> James Macdonald <james@kingfisher-systems.co.uk> Jason Smith <JasonParallel@gmail.com> John Muccigrosso @Jmuccigr Julien Le Goff <julego@gmail.com> Kay Lukas <kay.lukas@gmail.com> Kurt Revis <krevis@snoize.com> laura @holamon Marc Laporte <marc@laporte.name> Matthew M. Boedicker <matthewm@boedicker.org> Matthieu Bontemps <matthieu.bontemps@gmail.com> Max Sikstrom <max.sikstrom@op5.com> Nolan Neustaeter <github@noolan.ca> Oleg Kostyuk <cub.uanic@gmail.com> Pankaj Jangid <pankaj.jangid@gmail.com> robinbetts <robinbetts@yahoo.com> Sem <spam@esemi.ru> Stefan Weil <sw@weilnetz.de> Stephen Kennedy <sk4425@gmail.com> Steve Shreeve <steve.shreeve@gmail.com> Sven Nierlein <sven@nierlein.org> Tobin Juday <tobinibot@gmail.com> Todd Fisher <todd.fisher@gmail.com> Костадин Дамянов <maxmight@gmail.com> Emmanuel Bouthenot <kolter@openics.org> Rami @icnocop Khodeir-hubdoc @Khodeir-hubdoc Jonathan Jefferies @jjok Joe Ayers <joseph.ayers@crunchydata.com> Jeffrey Cafferata <jeffrey@jcid.nl> rainabba Mehdi Abbad Lyes Amazouz Pascal Bach Mário Silva 2009 February 23 WKHTMLTOPDF(1)
|
wkhtmltopdf - html to pdf converter
|
wkhtmltopdf [GLOBAL OPTION]... [OBJECT]... <output file> Document objects wkhtmltopdf is able to put several objects into the output file, an object is either a single webpage, a cover webpage or a table of contents. The objects are put into the output document in the order they are specified on the command line, options can be specified on a per object basis or in the global options area. Options from the Global Options section can only be placed in the global options area. A page objects puts the content of a single webpage into the output document. (page)? <input url/file name> [PAGE OPTION]... Options for the page object can be placed in the global options and the page options areas. The applicable options can be found in the Page Options and Headers And Footer Options sections. A cover objects puts the content of a single webpage into the output document, the page does not appear in the table of contents, and does not have headers and footers. cover <input url/file name> [PAGE OPTION]... All options that can be specified for a page object can also be specified for a cover. A table of contents object inserts a table of contents into the output document. toc [TOC OPTION]... All options that can be specified for a page object can also be specified for a toc, further more the options from the TOC Options section can also be applied. The table of contents is generated via XSLT which means that it can be styled to look however you want it to look. To get an idea of how to do this you can dump the default xslt document by supplying the --dump-default-toc-xsl, and the outline it works on by supplying --dump-outline, see the Outline Options section.
| null | null |
httpclient
| null | null | null | null | null |
docker
| null | null | null | null | null |
sam
| null | null | null | null | null |
docker-credential-ecr-login
| null | null | null | null | null |
kubectl.docker
| null | null | null | null | null |
prlcore2dmp
| null | null | null | null | null |
bundle
|
Bundler manages an application´s dependencies through its entire life across many machines systematically and repeatably. See the bundler website http://bundler.io for information on getting started, and Gemfile(5) for more information on the Gemfile format.
|
bundle - Ruby Dependency Management
|
bundle COMMAND [--no-color] [--verbose] [ARGS]
|
--no-color Print all output without color --retry, -r Specify the number of times you wish to attempt network commands --verbose, -V Print out additional logging information BUNDLE COMMANDS We divide bundle subcommands into primary commands and utilities: PRIMARY COMMANDS bundle install(1) bundle-install.1.html Install the gems specified by the Gemfile or Gemfile.lock bundle update(1) bundle-update.1.html Update dependencies to their latest versions bundle package(1) bundle-package.1.html Package the .gem files required by your application into the vendor/cache directory bundle exec(1) bundle-exec.1.html Execute a script in the current bundle bundle config(1) bundle-config.1.html Specify and read configuration options for Bundler bundle help(1) Display detailed help for each subcommand UTILITIES bundle add(1) bundle-add.1.html Add the named gem to the Gemfile and run bundle install bundle binstubs(1) bundle-binstubs.1.html Generate binstubs for executables in a gem bundle check(1) bundle-check.1.html Determine whether the requirements for your application are installed and available to Bundler bundle show(1) bundle-show.1.html Show the source location of a particular gem in the bundle bundle outdated(1) bundle-outdated.1.html Show all of the outdated gems in the current bundle bundle console(1) Start an IRB session in the current bundle bundle open(1) bundle-open.1.html Open an installed gem in the editor bundle lock(1) bundle-lock.1.hmtl Generate a lockfile for your dependencies bundle viz(1) bundle-viz.1.html Generate a visual representation of your dependencies bundle init(1) bundle-init.1.html Generate a simple Gemfile, placed in the current directory bundle gem(1) bundle-gem.1.html Create a simple gem, suitable for development with Bundler bundle platform(1) bundle-platform.1.html Display platform compatibility information bundle clean(1) bundle-clean.1.html Clean up unused gems in your Bundler directory bundle doctor(1) bundle-doctor.1.html Display warnings about common problems PLUGINS When running a command that isn´t listed in PRIMARY COMMANDS or UTILITIES, Bundler will try to find an executable on your path named bundler-<command> and execute it, passing down any extra arguments to it. OBSOLETE These commands are obsolete and should no longer be used: • bundle cache(1) • bundle show(1) November 2018 BUNDLE(1)
| null |
docker-credential-osxkeychain
| null | null | null | null | null |
uninstall-wkhtmltox
| null | null | null | null | null |
prlsrvctl
|
The prlsrvctl utility is used to manage Parallels Desktop. General Options --allow-to-confirm [--host-admin <name>] Prompt to enter admin credentials or a custom password if an operation requires it. If no operation requires a password, this option will be ignored. If an operation requires a password, this option shows a prompt to enter it. If an operation requires a password, but this option is omitted, the operation will fail with a corresponding error. To make an operation require a password, use the following options: --require-pwd , --require-custom-pwd or --lock-edit-settings as described below. --host-admin - specifies the host administrator name if an administrator password is required to unlock the Parallels Desktop preferences for editing. Getting Parallels Desktop parameters info Shows detailed information about the Parallels Desktop configuration. If the --license option is specified, only the information about the license is displayed. You can use the --json option to produce machine-readable output in JSON format. License management install-license <-k,--key <key>> Installs Parallels license. -k,--key <key> Parallels Desktop product key. -n,--name <name> Sets license owner name. -c,--company <name> Sets company name. --deferred Stores the license for deferred installation. deferred-license <--install|--remove> Operations with the license stored for deferred installation. --install Installs the license stored for deferred installation. --remove Removes the license stored for deferred installation. update-license Updates the current Parallels license. install-license-offline <-f,--file <path-to-license-file>> Install Parallels license offline. deactivate-license [--skip-network-errors] Deactivates the current Parallels license over the Internet and localy. --skip-network-errors Skips network errors and removes license localy. Configuring Parallels Desktop parameters set This command sets and configures various Parallels Desktop global parameters. The following options can be used with the set command: --mem-limit <auto|size> Sets the total memory allocated to Parallels Desktop and its virtual machines. auto - optimize the memory usage. size - set memory size manually. -s,--min-security-level <low|normal|high> Specifies the minimum connection security level that users needs to connect to the serevr. low - no transmitted data is encrypted. normal - only the most important data is encrypted. high - all transmitted data is encrypted. -c,--cep <on|off> Enables/disables the participation in the Customer Experience Program. --verbose-log <on|off> Enables or disables verbose log. --log-rotation <on|off> Enables or disables automatic rotation of the Parallels Dispatcher Service and virtual machine log files. --require-pwd <create-vm|add-vm|remove-vm|clone-vm|edit- preferences>:<on|off> Requires admin password to perform a operation. --require-custom-pwd <create-vm|add-vm|remove-vm|clone-vm|edit- preferences>:<on|off> Requires custom password to perform a operation. Operations: create-vm - create a new virtual machine. add-vm - add an existing virtual machine. remove-vm - remove a virtual machine. clone-vm - clone or convert a virtual machine or template. edit-preferences - edit common preferences. --custom-pwd [--custom-pwd-mode <on|off|change>] [--replace- commands] Sets/resets/changes a custom password for operations which require it. --custom-pwd-mode <on|off|change> Sets/resets/changes a custom password for operations which require it. --replace-commands Specify this option to reset commands that are protected with the admin password. This means that when you enable a custom password, commands that require the admin password will now require a custom password. Commands that previously required a custom password will be erased. The same logic is used when you switch back to the admin password (set --custom-pwd-mode to off). When you disable a custom password, commands that require a custom password will now require the admin password. Commands that previously required the admin password will be erased. This option is ignored if --custom-pwd-mode is specified as change. --lock-edit-settings <on|off [--host-admin <name>]> Locks or unlocks the Parallels Desktop preferences for editing. --host-admin - specifies the host administrator name if an administrator password is required to unlock the Parallels Desktop preferences for editing. --external-dev-auto-connect <host|guest|ask> When a new external device is connected to Mac: host - connect the device to the host computer. guest - connect the device to the virtual machine. guest - ask what to do. --hide-license-request-params <on|off> Hides host name and user name in requests to web-portal. Parallels Desktop web-portal commands web-portal signin <user> [-p,--read-passwd <path>] Sign in user to the Parallels Account web-portal signout Sign out user from the Parallels Account Parallels Desktop users commands user list [-o,--output field[,field...]] [-j,--json] Lists the user currently existing on the Parallels Desktop. -o,--output field[,field...] Displays only the specified field(s). user set <--def-vm-home <path>> Sets the default virtual machines location. Virtual network management net info <vnetwork_id> Shows detailed info about the virtual network vnetwork_id. net list [-j, --json] Lists the available Virtual Networks on the Parallels Desktop. net set <vnetwork_id> Updates the Virtual Network's properties. The following options can be used with the net set command: -i,--ifname <if> Sets the name of the network card on the Parallels Desktop to which the Virtual Network will be bound. -m,--mac <mac> Sets the MAC address of the network card on the Parallels Desktop to which the Virtual Network will be bound. The network card with the specified MAC address must exist on the Parallels Desktop. -t,--type <bridged|host-only|shared> Specifies the type of the Virtual Network. bridged - a virtual machine connected to this type of Virtual Network appears as an independent computer on the network. host-only - a virtual machine connected to this type of Virtual Network can access only the Parallels Desktop and the virtual machines connected to the same Virtual Network. shared - a virtual machine connected to this type of Virtual Network uses the Parallels Desktop's network connections. -d,--description <description> Sets the Virtual Network description. -n,--name <new_name> Sets a new name for the Virtual Network. --ip <ip[/mask]> Sets an IPv4 address and subnet mask for the Parallels virtual adapter. --dhcp-server <on|off> Enables or disables the Parallels virtual DHCPv4 server. --dhcp-ip <ip> Sets an IPv4 address for the Parallels virtual DHCPv4 server. --ip-scope-start <ip> Sets a start IPv4 address for the pool of IPv4 addresses. --ip-scope-end <ip> Sets an end IPv4 address for the pool of IPv4 addresses. --ip6 <ip[/mask]> Sets an IPv6 address and subnet mask for the Parallels virtual adapter. --dhcp6-server <on|off> Enables or disables the Parallels virtual DHCPv6 server. --dhcp-ip6 <ip> Sets an IPv6 address for the Parallels virtual DHCPv6 server. --ip6-scope-start <ip> Sets a start IPv6 address for the pool of IPv6 addresses. --ip6-scope-end <ip> Sets an end IPv6 address for the pool of IPv6 addresses. --host-assign-ip6 <on|off> Sets whether the host interface for this network will have IPv6 address. --connect-host-to-net <on|off> Connects the host to the current virtual network parallels adapter. --nat-<tcp|udp>-add <rule_name,src_port,<dest_ip|dest_vm>,dest_port> Adds a new port forwarding rule. rule_name - the port number forwarding rule name. src_port - the port number for incoming connections. dest_ip - an IP address to which incoming connections will be forwarded. dest_vm - the name or UUID (Universally Unique Identifier) of the virtual machine to which incoming connections will be forwarded. dest_port - the port number to which incoming connections will be forwarded. --nat-<tcp|udp>-del <rule_name> Deletes the specified port forwarding rule. Management USB devices usb list [-j, --json] [-c, --compat] [-a, --all] Lists USB devices known on the host together with the information of their assignments for the current user. In the compat mode all known USB devices are listed, showing the device name, device id and autoconnect options. In the new mode (without [-c, --compat] option), some additional information about the device is shown, such as whether the device is connected to a VM at the current moment. By default, only currently plugged to host devices are shown. To see all devices, call with [-a, --all] option usb set <usb_dev_id> [<vm_uuid | vm_name>] | [--autoconnect <ask | host>] | [--vm <vm_uuid | vm_name>] Either assigns a USB device with ID <usb_dev_id> to the specified virtual machine or configures the action for this device (suggest to connect to active VM or silently connect to host). When the device is configured to connect to a virtual machine, this USB device will be connected to the specified virtual machine when you start the virtual machine or attach the device to the host computer. usb del <usb_dev_id> Removes the assignment for the USB device with ID <usb_dev_id>. usb rename <usb_dev_id> <new_name | --auto> Changes name for the device with ID <usb_dev_id> either to <new_name> or to automatic device name. usb cleanup Cleans list of USB devices known on the host with all assignments. Miscellaneous commands problem-report <-d,--dump|-s,--send [--proxy <user[:password]@proxyhost[:port]> | --no-proxy]> [OPTIONS] Generates a problem report. If the -s,--send option is specified, the report is sent to the report server. If --attach-screenshot option is specified the host screenshot will be attached to the report. --detailed Problem report will include additional files as if detailed log messages was set. --no-auto-fallback Stops attempts to create a technical data report if some error occurs while collecting the data. --stand-alone Assembles report without connection to Parallels Desktop service. --name <user_name> Inserts to report info user name. --email <user_E-mail> Inserts to report info E-mail of user. --description <problem_description> Inserts to report info detailed problem description. --attach-screenshot <host> Specifies screenshot(s) to be attached to the report (only host screenshot is available). shutdown Shuts down Parallels Desktop (properly stops all services). -f,--force Forcibly shuts down Parallels Desktop. This operation does not wait for services to properly stop and hard- stops them. DIAGNOSTICS prlsrvctl returns 0 upon successful command execution. If a command fails, it returns the appropriate error code. SEE ALSO prlctl(8) COPYRIGHT Copyright (C) 2021 Parallels International GmbH. All rights reserved. Parallels Desktop 5 July 2017 prlsrvctl(8)
|
prlsrvctl - utility for managing Parallels Desktop.
|
prlsrvctl COMMAND [COMMAND-ARGS] [COMMAND-OPS] [GENERAL-OPS] prlsrvctl info [-j, --json] [--license] [-f, --full] prlsrvctl install-license <-k,--key <key>> [OPTIONS] prlsrvctl deferred-license <--install|--remove> prlsrvctl update-license prlsrvctl install-license-offline <-f,--file <path-to-license-file>> prlsrvctl deactivate-license [--skip-network-errors] prlsrvctl set [OPTIONS] prlsrvctl web-portal signin <user> [-p,--read-passwd <path>] prlsrvctl web-portal signout prlsrvctl user list prlsrvctl user set <--def-vm-home <path>> prlsrvctl net info <vnetwork_id> prlsrvctl net list [-j, --json] prlsrvctl net set <vnetwork_id> [OPTIONS] prlsrvctl usb list [-j, --json] [-c, --compat] [-a, --all] prlsrvctl usb set <usb_dev_id> [<vm_uuid | vm_name>] | [--autoconnect <ask | host>] | [--vm <vm_uuid | vm_name>] prlsrvctl usb del <usb_dev_id> prlsrvctl usb rename <usb_dev_id> <new_name | --auto> prlsrvctl usb cleanup prlsrvctl problem-report <-d,--dump|-s,--send [--proxy <user[:password]@proxyhost[:port]> | --no-proxy]> [OPTIONS] prlsrvctl shutdown [-f,--force]
| null | null |
prlctl
|
The prlctl utility manages the virtual machines. A virtual machine can be referred to by its ID or name assigned to the VM during its creation. General Options --allow-to-confirm [--host-admin <name>] Prompt to enter admin credentials or a custom password if an operation requires it. If no operation requires a password, this option will be ignored. If an operation requires a password, this option shows a prompt to enter it. If an operation requires a password, but this option is omitted, the operation will fail with a corresponding error. To make an operation require a password, use the following options: --require-pwd , --require-custom-pwd or --lock-edit-settings as described below. --host-admin - specifies the host administrator name if an administrator password is required to unlock the Parallels Desktop preferences for editing. Listing virtual machines list [-a,--all] [-f,--full] [-L] [-o,--output field[,field...]] [-s,--sort <field|-field>] [-t,--template] [-j,--json] Lists existing virtual machines. By default, only running VMs are displayed. -a,--all Lists all existing virtual machines regardless of their state (running, stopped, suspended, etc.). -f,--full Shows the real IP address(es) for running virtual machines. -o,--output field[,field...] Displays only the specified field(s). -s,--sort <field|-field> Sorts by the value of field (arguments are the same as those for -o). Add - before the field name to reverse the sort order. -L Lists fields which can be used for both the output (-o, --output) and sort order (-s, --sort) options. -t,--template Include templates in the output. -j,--json Produces output in the JSON format. list -i,--info [-f,--full] [-j,--json] [vm_id|vm_name] Displays virtual machine configuration information. By default, the information is shown for all existing VMs. Virtual machine management create <vm_name> --ostemplate <name> [--dst <path>] Creates the virtual machine with the name of <vm_name> on the basis of the specified template. You can get the list of available templates using the 'prlctl list -t' command. create <vm_name> [-o,--ostype <name|list>] Creates the virtual machine with the name of <vm_name> and optimize it for use with the operating system (OS) family specified after the --ostype option, respectively. You can get the list of available os types using the 'prlctl create vm_name -o list' command. create <vm_name> [-d,--distribution <name|list>] Creates the virtual machine with the name of <vm_name> and optimize it for use with the operating system (OS) family specified after the --distribution option, respectively. You can get the list of available distributions using the 'prlctl create vm_name -d list' command. You can use the --dst option to set the path to the directory where the virtual machine configuration files will be stored. You can use the --no-hdd option to create virtual machine without hard disk drives. You can use the --lion-recovery option to create virtual machine from Lion OS host recovery partition. You can use the --uuid option to specify a custom UUID for your virtual machine. After the virtual machine has been successfully created, you should install the corresponding operating system inside it. delete <vm_id|vm_name> Completely removes the specified Parallels virtual machine including all VM-related files and directories. register <path> [--uuid <UUID>] [--regenerate-src-uuid] [--force] Registers the virtual machine whose configuration file has the path of path. If the --uuid option is specified, the provided UUID will be used for virtual machine ID. If the --force option is specified, all validation checks will be skipped. If the --regenerate-src-uuid option is specified, the virtual machine source ID will be regenerated (SMBIOS product id will be changed as well). unregister <vm_id|vm_name> Unregisters the specified virtual machine. clone <vm_id|vm_name> --name <new_name> Makes a copy of the virtual machine <new_name>. You can use the --template option to change the type of the cloned virtual machine. You can use the --dst option to set the path to the directory where the virtual machine configuration files will be stored. The --regenerate-src-uuid option is used to regenerate the virtual machine source ID (SMBIOS product id will be changed as well). The --linked option is used to create a linked clone of virtual machine. The --unlink option is used to create an independent and fully identical virtual machine based on a linked clone. Existing virtual machines (parent VM and its linked clone) will not be modified. The -i,--id <snapid> option is used to create a linked clone of virtual machine based on snapshot with given snapid. The --detach-external-hdd <yes|no> specifies what to do with hard disks located outside the source virtual machine. If you specify yes, outside hard disks will be removed from the destination configuration. If you specify no, outside hard disks will remain in the configuration. Note: in either case the outside hard disks will not be copied to the destination. convert <path> [--dst <path>] [--force] Converts the specified third party virtual machine. You can use the --dst option to set the path where the virtual machine configuration file is saved to and the --force option to continue the virtual machine conversion even if the guest OS cannot be identified. move <vm_id|vm_name> --dst <path> Moves the files of the specified virtual machine to a new location <path> on the same computer. The command supports moving only stopped and suspended virtual machines. installtools <vm_id|vm_name> Starts the Parallels Tools installation in the specified virtual machine. enter <vm_id|vm_name> [--current-user | --user <user_name> [--password <password>]] Logs in to the virtual machine. It requires Parallels Tools to be installed in the virtual machine. exec <vm_id|vm_name> [--current-user | --user <user_name> [--password <password>]] [-r, --resolve-paths] <command> Executes the command command in the virtual machine. It requires Parallels Tools to be installed in the virtual machine. Commands in Linux guests are run via bash -c "command". Set --resolve-paths option to enable converting host paths to guest. status <vm_id|vm_name> Displays the status of the specified virtual machine. start <vm_id|vm_name> Starts the specified virtual machine. resume <vm_id|vm_name> Resumes the specified virtual machine. pause<vm_id|vm_name> [--acpi] Pauses the specified virtual machine. You can use --acpi option to use ACPI call suspend <vm_id|vm_name> Suspends the specified virtual machine. restart <vm_id|vm_name> Restarts the specified virtual machine. reset <vm_id|vm_name> Resets the specified virtual machine. reset-uptime <vm_id|vm_name> Resets the specified virtual machine uptime counter (counter start date/time also will be reset with this action). stop <vm_id|vm_name> [--kill] [--noforce] [--acpi] [--drop-state] Stops the specified virtual machine. You can use the --kill option to forcibly stop the VM. You can use th --noforce option to consent stopping the VM. You can use the --acpi option to use ACPI call. You can use the --drop-state option to drop the suspended state of the VM. capture <vm_id|vm_name> --file <name> Captures a screen area of a virtual machine directly to a file name in png format. encrypt <vm_id|vm_name> [--dry-run] Encrypts the specified virtual machine. You can use the the --dry-run option to check preconditions for successful encryption. decrypt <vm_id|vm_name> [--dry-run] Decrypts the specified encrypted virtual machine. You can use the the --dry-run option to check preconditions for successful decryption. change-passwd <vm_id|vm_name> Changes password for the specified virtual encrypted machine. archive <vm_id|vm_name> Archives the specified virtual machine bundle. unarchive <vm_id|vm_name> Unarchives the specified virtual machine bundle. pack <vm_id|vm_name> Packs the specified virtual machine bundle. unpack <vm_id|vm_name> Unpacks the specified virtual machine packed file. protection-set <vm_id|vm_name> Protects the specified encrypted virtual machine expiration date settings with a password. protection-remove <vm_id|vm_name> Disables password protection for the specified encrypted virtual machine expiration date settings. Snapshot management snapshot <vm_id|vm_name> [-n,--name <name>] [-d,--description <desc>] Creates the virtual machine snapshot. You can set appropriate name <name> and description <desc> for a new snapshot. snapshot-delete <vm_id|vm_name> -i,--id <snapid> [-c,--children] Deletes snapshot by snapid. If --children option is specified all snapshot's children will be deleted. snapshot-list <vm_id|vm_name> [-j, --json] [{-t,--tree] | [-i,--id <snapid>}] Displays the virtual machine snapshot tree. There are three modes of displaying the tree. If no option is specified, the snapshot tree is displayed as a table with two columns: PARENT_SNAPSHOT_ID, SNAPSHOT_ID. If -t,--tree option is specified, ASCII graphics is used to display the tree. If -i,--id <snapid> option is specified the snapshot information is displayed. snapshot-switch <vm_id|vm_name> -i,--id <snapid> [--skip-resume] Reverts to selected <snapid> snapshot. --skip-resume Do not start vm if it was running when the snapshot was taken. Miscellaneous commands problem-report <vm_id|vm_name> <-d,--dump|-s,--send [--proxy [user[:password]@proxyhost[:port]]] [--no-proxy]> [OPTIONS] Generates a problem report. If the -s,--send option is specified, the report is sent to Parallels; otherwise, it is dumped to stdout. --name <user_name> Inserts user name to report info. --email <user_E-mail> Inserts user E-mail to report info. --description <problem_description> Inserts detailed problem description to the report info. --attach-screenshot <host | vm | all> Specifies screenshot(s) to be attached to the report (vm, host or all). --detailed Problem report will include additional files as if detailed log messages was set. guest-debugger <vm_id|vm_name> [--port <port>] Allows to connect the debugger to a running virtual machine via the specified port. The debugger must be on the same computer where the virtual machine is running. debug-dump <vm_id|vm_name> [--name <dump_file_name>] [--path <output_directory_path>] Collects the virtual machine memory dump and CPU state. By default, a dump file is called "memory.elf.dmp". When you create a new dump file, the previous one gets overwritten so if you want to have more than 1 dump file, specify different file names. By default, dump files are saved in the virtual machine directory. If you want to save them in another directory, specify the desired directory path. Virtual machine configuration parameters set <vm_id|vm_name> This command is used to set and configure various virtual machine parameters. If the --force option is specified, all validation checks will be skipped. The following options can be used with the set command: CPU parameters --cpus <auto|num> Sets the number of CPUs to be available to the virtual machine. Memory parameters --memsize <auto|num> Sets the amount of memory that the virtual machine can consume (in megabytes). Boot order parameters --device-bootorder <"name1 name2 ..."> Specifies the order of boot devices for the virtual machine. Supported devices are HDD, CD/DVD, FDD, Network. A device name can be obtained using the 'prlctl list -i' command. --bios-type <legacy|efi32|efi64|efi-arm64> Sets the type of BIOS used by your virtual machine: legacy: The virtual machine is booting using the legacy BIOS firmware. This option is used by default. efi32: The virtual machine is booting using the 32-bit EFI firmware. efi64: The virtual machine is booting using the 64-bit EFI firmware. efi-arm64: The virtual machine is booting using the 64-bit EFI firmware on a host with ARM architecture. --efi-secure-boot <on|off> Enables or disables an EFI Secure boot option. --select-boot-device <on|off> Enables or disables selecting a boot device at the virtual machine startup. --external-boot-device <name> Sets an external device from which to boot the virtual machine. --smbios-board-id <board_identification_string> Sets SMBIOS board identification string assigned to the virtual machine.. --smbios-build-version <build_version_string> Sets SMBIOS build version string assigned to the virtual machine. --smbios-serial-number <serial_number> Sets SMBIOS serial number assigned to the virtual machine. Video parameters --video-adapter-type <parallels|virtio> Sets the type of the video adapter to create in the virtual machine. --videosize <auto|num> Sets the amount of memory for the virtual machine graphic card (in megabytes). --3d-accelerate <off|highest|dx9> Sets 3d acceleration video mode. --vertical-sync <on|off> Enables or disables vertical synchronization. --high-resolution <on|off> Enables or disables high resolution video mode for drawing on host retina display. --high-resolution-in-guest <on|off> Enables or disables use of highest UI scaling inside guest OS. --native-scale-in-guest <on|off> Enables or disables per-display UI scaling inside guest OS (overrides --high-resolution-in-guest). Mouse and keyboard parameters --smart-mouse-optimize <auto|on|off> Sets smart mouse optimization mode. --sticky-mouse <on|off> Enables or disables sticky mouse option. --smooth-scrolling <on|off> Enables or disables smooth scrolling option. --keyboard-optimize <auto|accessibility|on|off> Sets the keyboard optimization mode: auto: Automatically select keyboard optimization mode. accessibility: Optimise keyboard for accessibility usage. on: Optimise keyboard for games. off: Don't optimize keyboard. Virtual printers parameters --sync-host-printers <on|off> Enables or disables using host printers in Windows guests (starting from Windows 2000). --sync-default-printer <on|off> Synchronizes host default printer with Windows default printer. --show-host-printer-ui <on|off> Show host printer UI before actual printing. USB and bluetooth parameters --auto-share-camera <on|off> Enables or disables automatic web cameras sharing. --auto-share-bluetooth <on|off> Enables or disables automatic Bluetooth devices sharing. --auto-share-smart-card <on|off> Enables or disables automatic Smart Card devices sharing. --auto-share-gamepad <on|off> Enables or disables automatic Bluetooth gamepads sharing. --support-usb30 <on|off> Enables or disables USB 3.0 support. Startup and shutdown parameters --autostart <off|open-window|start-app|start-host|user- login> Sets the virtual machine autostart options: off: The virtual machine is started manually. open-window: The virtual machine starts when its window opens. start-app: The virtual machine starts when Parallels Desktop starts. start-host: The virtual machine is started automatically on the host boot. user-login: The virtual machine is started automatically on user login. --autostart-delay <n> Sets the virtual machine autostart delay on host boot to n seconds. --autostop <stop|suspend|shutdown> Specifies the virtual machine automatic stop option on host shutdown. --startup-view <same|window|coherence|fullscreen|modality|headless> Sets the virtual machine startup view options: same: Same as the last time. window: Normal window. coherence: Coherence. fullscreen: Full screen. modality: Modality. headless: Headless. --on-shutdown <window|close|quit> Sets the virtual machine shutdown options: window: The virtual machine window remains open after the virtual machine is shut down. close: The virtual machine window closes after the virtual machine is shut down. quit: Parallels Desktop quits after the virtual machine shutdown. --on-window-close <suspend|shutdown|stop|ask|keep- running> Sets the virtual machine window close options: suspend: The virtual machine is suspended after its window is closed. shutdown: The virtual machine is shut down after its window is closed. stop: The virtual machine is forcibly stopped after its window is closed. ask: Ask the user whether the virtual machine should be suspended, shut down, or stopped. keep-running: The virtual machine is kept running after its window is closed. --pause-idle <on|off> Enables or disables pausing the virtual machine when possible. --undo-disks <off|discard|ask> Sets the virtual machine undo disks options: off: Undo disks mech is off. discard: Discard all changes made in the virtual machine after it is stopped. ask: Ask the user what to do: apply changes or discard them after the virtual machine is stopped. Optimization parameters --faster-vm <on|off> Sets the performance mode: faster virtual machine or faster host. --hypervisor-type <parallels|apple> Sets the hypervisor type. Note that 'parallels' can be used only on a Mac with the x86_64 architecture. --adaptive-hypervisor <on|off> Enables or disables adaptive hypervisor. --disable-winlogo <on|off> Enables or disables Windows logo in order to tune its speed. --auto-compress <on|off> Enables or disables automatic compression of virtual disks. --nested-virt <on|off> Enables or disables nested virtualization. --pmu-virt <on|off> Enables or disables PMU virtualization. --longer-battery-life <on|off> Sets power option: longer battery life or better performance. --battery-status <on|off> Shows or hide battery status. --resource-quota <low|medium|unlimited> Sets the virtual machine resource quota: low - the host uses maximum possible resources. medium - the host and the virtual machine evenly share resources. unlimited - the virtual machine uses maximum possible resources. Travel mode parameters --travel-enter <never|battery-always|battery-threshold> Selects when virtual machine automatically enters Travel mode: never - Disables automatically enter Travel mode. battery-always - Automatically enter Travel mode when host starts working on battery. battery-threshold - Automatically enter Travel mode when battery level below the threshold. --travel-enter-threshold <percentage> Sets the battery level threshold to automatically enter Travel mode. --travel-quit <never|power-connected> Selects when virtual machine automatically quit Travel mode: never - Disables automatically quit Travel mode. battery-always - Automatically quit Travel mode when host connected to power. Security parameters --require-pwd <exit-fullscreen|change-vm-state|manage- snapshots|change-guest-pwd|change-vm-config>:<on|off> Requires admin password to perform a operation. --require-custom-pwd <exit-fullscreen|change-vm- state|manage-snapshots|change-guest-pwd|change-vm- config>:<on|off> Requires custom password to perform a operation. Operations: exit-fullscreen - exit fullscreen mode. change-vm-state - change the virtual machine state. manage-snapshots - manage snapshots. change-guest-pwd - change guest OS password via CLI. change-vm-config - change the virtual machine configuration. --custom-pwd [--custom-pwd-mode <on|off|change>] [--replace-commands] Sets/resets/changes a custom password for operations which require it. --custom-pwd-mode <on|off|change> Sets/resets/changes a custom password for operations which require it. --replace-commands Specify this option to reset commands that are protected with the admin password. This means that when you enable a custom password, commands that require the admin password will now require a custom password. Commands that previously required a custom password will be erased. The same logic is used when you switch back to the admin password (set --custom-pwd- mode to off). When you disable a custom password, commands that require a custom password will now require the admin password. Commands that previously required the admin password will be erased. This option is ignored if --custom-pwd-mode is specified as change. --lock-edit-settings <on|off [--host-admin <name>]> Locks or unlocks editing of the virtual machine configuration. --host-admin <name> Specifies the host administrator name if an administrator password is required to unlock editing of the virtual machine configuration. --userpasswd <user:passwd> [--host-admin <name>] Sets the password for the specified user in the virtual machine. If the user account does not exist, it is created. Parallels Tools must be installed in the virtual machine for the command to succeed. --host-admin <name> Specifies the host administrator name if an administrator password is required to change the password for the specified user in the virtual machine. --lock-on-suspend <on|off> Always locks guest OS on suspend. --isolate-vm <on|off> Isolates host from the virtual machine. --smart-guard <on|off> Enables or disables smart guard mech. --sg-notify-before-create <on|off> Notifies the user before creating a snapshot. --sg-interval <seconds> Sets the time interval between snapshots. --sg-max-snapshots <num> Sets the maximum allowed number of snapshots. --tpm <on|off|2|crb> Enables or disables Trusted Platform Module. TPM 2.0 TIS is used by default. You can specify another supported version. Supported version values: <2>. --tpm-key <plain:tpm-key|file:file-with-tpm-key> [--force] Import the key of the TPM (Trusted Platform Module) chip. plain:tpm-key - use prefix plain: to set a value of the TPM key that is being imported. file:file-with-tpm-key - use prefix file: to set a path to the file with the TPM key that is being imported. --force - allows you to overwrite the existing TPM key in the storage. NOTE: Please be careful with this option - if there are two or more virtual machines with the same UUID, equipped with a TPM chip and used by different users, overwriting the TPM key may prevent them from booting. Protection parameters --expiration <<on|off>|date:<yyyy-MM-ddThh:mm:ss>|time- check:<seconds>|offline-time:<seconds>|time- server:<url>|note:<text>> Expiration date parameters: on|off: Enables or disables expiration date checking. date: Sets date and time when the virtual machine usage period expires (e.g. 2014-12-30T20:30:00). time-check: Sets how often (in seconds) Parallels Desktop contacts the time server to check the expiration date and time. offline-time: Sets the time period (in seconds) during which a user can work with the virtual machine if Parallels Desktop is unable to check the expiration date and time. time-server: Specifies the URL of a trusted time server to check the expiration date and time. note: Adds any note (e.g. system administrator contact info). Virtual machine devices management The following options can be used to manage devices: --device-add, --device-set, --device-del, --device- connect and --device-disconnect. Only one option can be specified at a time. --device-connect <device_name> Connects the specified device to a running virtual machine. The device can be of type fdd, cdrom, sound, or net. The device name could be obtained using the 'prlctl list -i' command. --device-disconnect <device_name> Disconnects the specified device from a running virtual machine. --device-set <device_name> <<--enable|--disable>|<--connect|--disconnect>> Enables/disables or connects/disconnects the specified device to/from a virtual machine. Please note that the --device-set command is also used to modify a device configuration and has additional parameters, which are different for different types of devices. For instance: Modify a virtual hard disk --device-set <hdd_name> [--image <image_name>] [--type <expand | plain>] [--size <n>] [--split] [--iface <ide | scsi | sata>] [--position <n>] [--subtype <buslogic | lsi-spi | lsi-sas>] [--online-compact <on | off>] hdd_name: The name of the virtual hard disk to modify (--device-set command only). Virtual hard disks are named using the hddN format where N is the drive index number starting from 0 (e.g. hdd0, hdd1). To obtain the list of disk names, use the prlctl list --info command. --image: specifies the name of the file to be used for emulating the VM virtual disk drive. If this option is omitted, a new file is created inside the directory storing all VM-related configuration files and assigned the name of harddiskN.hdd. --type: specifies the type of the virtual disk from one of the following: expand (default): virtual disks of this type are small initially and grow in size as you add data to it. plain: virtual disks of this type have a fixed size from the moment of their creation. --size: hard disk size, in megabytes. --split: splits the hard disk into 2 Gb pieces. --iface: virtual hard disk interface type: ide, scsi, or sata. --position: the SCSI / IDE / SATA device identifier to be used for the disk drive. Allowed ranges: 0-3 for IDE disk drives 0-6 for SCSI disk drives 0-5 for SATA disk drives --subtype: virtual hard disk subtype: buslogic, lsi-spi, lsi-sas. --online-compact: enables or disables virtual hard disk online compact mode. Modify an optical drive --device-set <drive_name> [--image <name>] [--iface <ide | scsi | sata>] [--position <n>] [--subtype <buslogic | lsi-spi | lsi-sas>] drive_name: The name of the optical drive to modify (--device-set command only). To obtain the list of the available drives, use the prlctl list --info command. --image: connect the specified image file to the virtual machine. The following image file formats are supported: iso, cue, ccd, dmg. --iface: virtual optical interface type: ide, scsi, sata. --position: the SCSI / IDE / SATA device identifier to be used for the optical drive. Allowed ranges: 0-3 for IDE disk drives 0-6 for SCSI disk drives 0-5 for SATA disk drives --subtype: virtual optical drive subtype: buslogic, lsi-spi, lsi-sas. Modify an FDD --device-set <fdd_name> --image <image> [--recreate] fdd_name: The name of the floppy disk drive to modify (--device-set command only). To obtain the list of the available drives, use the prlctl list --info command. --image: specifies the image file. --recreate: if included, recreates the image file if it exists. Modify a network adapter --device-set <adapter_name> net --type <shared | bridged | host-only> [--iface <name>] [--mac <addr | auto>] [--ipadd <addr [/mask]> | --ipdel <addr[/mask]> | --dhcp <yes | no> | --dhcp6 <yes | no>] [--gw <gw>] [--gw6 <gw>] [--nameserver <addr>] [--searchdomain <addr>] [--configure <yes | no>] [--apply-iponly <yes | no>] [--adapter-type <virtio | e1000 | e1000 | rtl>] adapter_name: the name of the virtual network adapter to modify (--device-set command only). To obtain the list of the available adapters, use the prlctl list --info command. --type: the type of the network adapter to create in the virtual machine. --iface: the host network interface to be assigned to the bridged or host-only virtual network adapter. --mac: the MAC address to be assigned to the virtual network adapter. If omitted, the MAC address will be automatically generated. --ipadd: the IP address to be assigned to the network adapter in the virtual machine. --ipdel: the IP address to be removed from the network adapter in the virtual machine. --dhcp: specifies whether the virtual network adapter should get its IP settings through a DHCP server. --dhcp6: specifies whether the virtual network adapter should get its IPv6 settings through a DHCP server. --gw: the default gateway to be used by the virtual machine. --gw6: the default IPv6 gateway to be used by the virtual machine. --nameserver: the default DNS server to be used by the virtual machine. --searchdomain: the default search domain to be used by the virtual machine. --configure: if set to yes, the settings above are applied to the virtual network adapter instead of its original settings. Configuring any of the settings automatically sets this option to yes. --apply-iponly: if set to yes, the hostname, nameserver, and search domain settings from the virtual machine configuration file are ignored. --adapter-type: specifies the network adapter emulation type. Modify a serial port --device-set <port_name> {--device <name>|--output <file>|--socket <name> [--socket-mode <server|client>]} port_name: the name of the port to modify (--device-set command only). To obtain the list of the available ports, use the prlctl list --info command. --device: the number of the host computer serial port that will be used by the virtual machine. --output: the path to the file where the output of the virtual serial port will be sent. --socket: the name of the host computer socket to which the serial port will be connected. --socket-mode: the socket operation mode. Modify a parallel port --device-set <port_name> {--device <name> | --output <file>} port_name: the name of the port to modify (--device-set command only). To obtain the list of the available ports, use the prlctl list --info command. --device: the parallels port number on the host computer that will be used by the virtual machine. --output: the path to the file where the output of the virtual parallel port will be sent. Modify a sound card --device-set sound --output <name> --input <name> --ouput: the name of a physical output device to which to connect the virtual sound card. --input: the name of the physical input device to which to connect the virtual sound card. --device-del <device_name> [--detach- only|--destroy-image|--destroy-image-force] Removes the specified device from the virtual machine. If --detach-only is specified and the device is a virtual hard disk drive, the disk image is preserved. If --destroy-image is specified, the virtual HDD image is removed from the server. If --destroy-image-force is specified, the virtual HDD image is removed from all snapshots and from the server. The default action on deleting a virtual HDD is to detach the HDD image as if --detach-only was specified. --device-add <hdd|cdrom|net|fdd|serial|parallel|sound|usb> [device_options] Adding virtual hard disk drives --device-add hdd [--image <image_name>] [--type <expand|plain>] [--size <n>] [--split] [--iface <ide|scsi|sata|nvme>] [--position <n>] [--subtype <buslogic|lsi-spi|lsi- sas>] [--online-compact <on|off>] image_name: the name of the file to be used for emulating the VM virtual disk drive. If this option is omitted, a new file is created inside the directory storing all VM- related configuration files and assigned the name of harddiskN.hdd. --type: specifies the type of the virtual disk drive: expand (default): virtual disks of this type are small initially and grow in size as you add data to the disk. plain: virtual disks of this type have the fixed size from the moment of their creation. --size: the size of the hard disk drive, in megabytes. --split: splits the hard disk drive into 2 Gb pieces. --iface: virtual hard disk interface type: either ide or scsi or sata or nvme. --position: the SCSI or IDE or SATA or NVME device identifier to be used for the disk drive. Allowed ranges: 0-3 for IDE disk drives 0-6 for SCSI disk drives 0-5 for SATA disk drives 0-2 for NVMe disk drives --subtype: virtual hard disk subtype: either buslogic or lsi-spi or lsi-sas. --online-compact: enables or disables virtual hard disk online compact mode. Connecting physical hard disks --device-add hdd --device <real_name> [--iface <ide|scsi|sata|nvme>] [--passthr <yes|no>] [--position <n>] [--subtype <buslogic|lsi-spi|lsi-sas>] --device: the name of the host computer's hard disk that will be connected to the virtual machine. You can use the 'prlsrvctl info' command to view the names of all hard disks currently existing on the host computer. --iface: virtual hard disk interface type: either ide or scsi or sata or nvme. --passthr: enables the passthrough mode for the specified device. --position: the SCSI or IDE or SATA or NVMe device identifier to be used for the disk drive. Allowed ranges: 0-3 for IDE disk drives 0-6 for SCSI disk drives 0-5 for SATA disk drives 0-2 for NVMe disk drives --subtype: virtual hard disk subtype: either buslogic or lsi-spi or lsi-sas. Adding virtual CD/DVD-ROM drives --device-add cdrom [--image <name>] [--iface <ide|scsi|sata>] [--position <n>] [--subtype <buslogic|lsi-spi|lsi-sas>] --image: connect the specified image file to the virtual machine. The following image file formats are supported: .iso, .cue, .ccd, and .dmg. --iface: virtual CD/DVD-ROM interface type: either ide or scsi or sata. --position: the SCSI or IDE or SATA device identifier to be used for the DVD/CD-ROM drive. Allowed ranges: 0-3 for IDE disk drives 0-6 for SCSI disk drives 0-5 for SATA disk drives --subtype: virtual CD/DVD-ROM subtype: either buslogic or lsi-spi or lsi-sas. Connecting physical DVD/CD-ROM drive --device-add cdrom --device <name> [--iface <ide|scsi|sata>] [--passthr <yes|no>] [--position <n>] [--subtype <buslogic|lsi- spi|lsi-sas>] --device: the name of the host computer's CD/DVD-ROM that will be connected to the virtual machine. You can use the 'prlsrvctl info' command to view the names of all CD/DVD-ROM drives currently existing on the host computer. --iface: virtual CD/DVD-ROM interface type: either ide or scsi or sata. --passthr: enables the passthrough mode for the specified device. --position: the SCSI or IDE or SATA device identifier to be used for the DVD/CD-ROM drive. Allowed ranges: 0-3 for IDE disk drives 0-6 for SCSI disk drives 0-5 for SATA disk drives --subtype: virtual CD/DVD-ROM subtype: either buslogic or lsi-spi or lsi-sas. Adding virtual floppy disk drive --device-add fdd --image <image> [--recreate] Adds virtual floppy disk based on file image. --recreate: recreates image file if it exists. Connecting physical floppy disk drive to VM --device-add fdd [--device <real_name>] Adds physical floppy disk. --device: specifies physical floppy disk name. Adding virtual network adapter --device-add net --type <shared|bridged|host-only> [--iface <name>] [--mac <addr|auto>] [--ipadd <addr[/mask]> | --ipdel <addr[/mask]> | --dhcp <yes|no> | --dhcp6 <yes|no>] [--gw <gw>] [--gw6 <gw>] [--nameserver <addr>] [--searchdomain <addr>] [--configure <yes|no>] [--apply- iponly <yes|no>] [--adapter-type <virtio|e1000|e1000e|rtl>] --type: the type of the network adapter to create in the virtual machine. --iface: the host network interface to be assigned to the bridged or host-only virtual network adapter. --mac: the MAC address to be assigned to the virtual network adapter. If omitted, the MAC address will be generated automatically. --ipadd: the IP address to assign to the network adapter in the virtual machine. --ipdel: the IP address to remove from the network adapter in the virtual machine. --dhcp: specifies whether the virtual network adapter should get its IP settings through a DHCP server. --dhcp6: specifies whether the virtual network adapter should get its IPv6 settings through a DHCP server. --gw: the default gateway to be used by the virtual machine. --gw6: the default IPv6 gateway to be used by the virtual machine. --nameserver: the default DNS server to be used by the virtual machine. --searchdomain: the default search domain to be used by the virtual machine. --configure: if set to "yes", the settings above are applied to the virtual network adapter instead of its original settings. Configuring any of the settings above automatically sets this option to "yes". --apply-iponly: if set to "yes", the hostname, nameserver, and search domain settings from the virtual machine configuration file are ignored. --adapter-type: specifies network adapter emulation type. Adding virtual serial port --device-add serial {--device <name> | --output <file> | --socket <name> [--socket-mode <server|client>]} --device: host computer serial port number that will be used by the virtual machine. --output: a path and filename to which the output of the virtual serial port will be sent. --socket: host computer socket to which the serial port will be connected. --socket-mode: the socket operation mode. Adding virtual parallel port --device-add parallel {--device <name> | --output <file>} --device: host computer parallel port number that will be used by the virtual machine. --output: a path and filename to which the output of the virtual parallel port will be sent. Adding virtual sound card --device-add sound --output <name> --input <name> Enable USB support --device-add usb Modality parameters --modality-opacity <percentage> Set the virtual machine window opacity value (in percentage) to use in Modality view mode. --modality-stay-on-top <on|off> Enable or disable virtual machine window to stay on top of all other open windows in Modality view mode. --modality-show-on-all-spaces <on|off> Enable or disable virtual machine window to be displayed on all spaces in Modality view mode. --modality-capture-mouse-clicks <on|off> Enable or disable virtual machine window to capture mouse clicks in Modality view mode. If enabled, you will click "through" the window. Fullscreen parameters --fullscreen-use-all-displays <on|off> Enable or disable using all connected to host dispalys when guest OS enter Full Screen view mode. --fullscreen-activate-spaces-on-click <on|off> If enabled, click the virtual machine on any of your displays and it will appear on all displays. It's useful when you switched some of your displays to a space that doesn't belong to the virtual machine and then decide to return to the virtual machine and make it displayed on all connected monitors again. --fullscreen-optimize-for-games <on|off> If enabled, macOS Dock, menu bar and notifications will not be displayed. To release the mouse input, press Ctrl + Alt. --fullscreen-gamma-control <on|off> If you're using the virtual machine to play video games, the virtual machine may need to temporarily change your Mac's display gamma setting to properly display different visual effects. To allow the virtual machine to change gamma settings, enable this option. This option works in the Full Screen view mode only. --fullscreen-scale-view-mode <off|auto|keep- ratio|stretch> Sets how the virtual machine is displayed when working in Full Screen view mode: off: If Parallels Tools are installed, the virtual machine resolution matches that of the Mac. If Parallels Tools aren't installed, the virtual machine resolution remains unchanged. If it is lower than that of the Mac, the virtual machine is displayed on the black background. If higher, the virtual machine has scroll bars. auto: If Parallels Tools are installed, the virtual machine resolution matches that of the Mac. If Parallels Tools aren't installed, the virtual machine resolution remains unchanged. If it is lower than that of the Mac, the virtual machine is displayed on the black background. If higher, the virtual machine is entirely displayed on the screen without any scroll bars. keep-ratio: No matter whether Parallels Tools are installed or not, the virtual machine resolution remains unchanged. If it is lower than that of the Mac, the virtual machine is displayed on the black background. If higher, the virtual machine is entirely displayed on the screen without any scroll bars. stretch: No matter whether Parallels Tools are installed or not, the virtual machine resolution remains unchanged but the virtual machine is stretched to occupy the whole screen. Coherence parameters --winsystray-in-macmenu <on|off> Shows Windows notification area in Mac menu bar. --auto-switch-fullscreen <on|off> Allows applications to auto-switch to full screen. Shared Folders management A shared folder is a host OS folder that can be accessed from a virtual machine. --shf-host-add <name> --path <path> [--mode <ro|rw>] [--shf-description <txt>] [--enable|--disable] Shares the host OS folder name with a virtual machine. --shf-host-del <name> Removes the specified folder from the list of shared folders. --shf-host-set <name> --path <path> [--mode <ro|rw>] [--shf-description <txt>] [--enable|--disable] Modifies the settings of the host OS shared folder name. --shf-host-defined <off|alldisks|home> off: Disable sharing of folders defined by the host OS. alldisks: Share all host OS disks with a virtual machine. home: Share a host OS user's home directory with a virtual machine. --shf-host-automount <on|off> Enables or disables automatic mounting the shared host OS folders to the guest OS. --shf-guest <on|off> Enables or disables sharing the user- defined guest OS folders with macOS. --shf-guest-automount <on|off> Enables or disables automatic mounting the shared guest OS folders to the macOS. --shf-guest-automount-cloud-drives <on|off> Enables or disables automatic mounting the guest OS cloud folders to the macOS. --shf-guest-automount-network-drives <on|off> Enables or disables automatic mounting the guest OS network drives to the macOS. --shf-guest-automount-removable-drives <on|off> Enables or disables automatic mounting the guest OS removable drives to the macOS. Time synchronization parameters --time-sync <on|off> Enables or disables the virtual machine time synchronization. --time-sync-smart-mode <on|off> Enables or disables the virtual machine time synchronization smart mode. --disable-timezone-sync <on|off> Enable this option to sync only UTC time without timezone synchronization. --time-sync-interval <seconds> Sets the time synchronization interval.. Shared Profile parameters --shared-profile <on|off> Enables or disables shared profile. --shared-profile-use-desktop <on|off> Enables or disables Desktop folder sharing. --shared-profile-use-documents <on|off> Enables or disables Documents folder sharing. --shared-profile-use-pictures <on|off> Enables or disables Pictures folder sharing. --shared-profile-use-music <on|off> Enables or disables Music folder sharing. --shared-profile-use-movies <on|off> Enables or disables Movies folder sharing. --shared-profile-use-downloads <on|off> Enables or disables Downloads folder sharing. Shared Application parameters --sh-app-host-to-guest <on|off> Enables or disables sharing host applications to guest. --sh-app-guest-to-host <on|off> Enables or disables sharing guest applications to host. --show-guest-app-folder-in-dock <on|off> Enables or disables showing the folder with guest OS applications in the Dock. --show-guest-notifications <on|off> Enables or disables displaying the Windows system tray icons in the macOS menu bar. --bounce-dock-icon-when-app-flashes <on|off> Enables or disables Windows application icons bouncing to alert. Miscellaneous Sharing parameters --shared-clipboard <on|off> Enables or disables shared clipboard. --shared-cloud <on|off> Enables or disables shared cloud. Smart Mount parameters --smart-mount <on|off> Enables or disables shared volumes. --smart-mount-removable-drives <on|off> Enables or disables removable drives sharing. --smart-mount-dvd-drives <on|off> Enables or disables cd/dvd drives sharing. --smart-mount-network-shares <on|off> Enables or disables network drives sharing. Advanced parameters --sync-vm-hostname <on|off> Enables or disables synchronization of the virtual machine name and hostname in guest OS. Supported only for Linux guests. --sync-ssh-ids <on|off> Enables or disables synchronization of OS X SSH public keys with those from the guest OS "authorized_keys" file. This feature is similar to the ssh-copy- id(1) utility. When enabled, all OS X SSH public keys are added to the guest OS "authorized_keys" file. This allows users to log in to the guest OS via SSH without having to enter the password. The following SSH keys are synced: • When a user creates a new SSH key pair in OS X, the public key is also added to the guest OS. • When a user removes a public key from OS X, this key is also removed from the guest OS. The details of current implementation: • Public key synchronization is currently available for Linux guest operating systems only. • Public key synchronization works provided that the guest OS user has the same name as in OS X or user is the only regular user in guest system. The public key is synced in the following cases: • After Parallels Tools are installed. • After booting or rebooting the guest OS. • After the virtual machine resumes. • After the public key synchronization feature is enabled/disabled. Additional information: • If the feature is disabled, all OS X SSH public keys are removed from the guest OS. • The "authorized_keys" file and public keys are searched only in the "~/.ssh" directory. • SSH authorization certificates are not supported. --show-dev-tools <on|off> Enables or disables show developer tools in menu. --swipe-from-edges <on|off> Enables or disables edge swipe gestures. --share-host-location <on|off> Enables or disables share host location with the virtual machine. --rename-ext-disks Renames external virtual hard disks bundles according to the virtual machine name. --system-flags Pass additional system flags (aka boot flags) to VM. Flags must be separated by semicolon. Miscellaneous parameters --name <name> Changes the virtual machine name. --description <desc> Sets the virtual machine description. --distribution <name|list> Sets the virtual machine OS version(s) family. --asset-id <id> Changes the virtual machine asset ID. --template <on|off> Converts the virtual machine to template and back. --tools-autoupdate <yes|no> Sets up auto updating mode for Parallels Tools Agent. --usedefanswers <on|off> Enables or disables default mech answers on the quetions from the virtual machine. DIAGNOSTICS prlctl returns 0 upon successful command execution. If a command fails, it returns the appropriate error code.
|
prlctl - utility for managing Parallels Desktop and Parallels virtual machines.
|
prlctl COMMAND [<ID|NAME>] [COMMAND-ARGS] [COMMAND-OPS] [GENERAL-OPS] prlctl list [OPTIONS] prlctl list -i,--info [OPTIONS] [vm_id|vm_name] prlctl create <vm_name> [OPTIONS] prlctl delete <vm_id|vm_name> prlctl register <path> [OPTIONS] prlctl unregister <vm_id|vm_name> prlctl clone <vm_id|vm_name> --name <new_name> [OPTIONS] prlctl convert <path> [--dst <path>] [--force] prlctl move <vm_id|vm_name> --dst <path> prlctl installtools <vm_id|vm_name> prlctl enter <vm_id|vm_name> [OPTIONS] prlctl exec <vm_id|vm_name> [OPTIONS] <command> [arg ...] prlctl status <vm_id|vm_name> prlctl start <vm_id|vm_name> prlctl resume <vm_id|vm_name> prlctl pause <vm_id|vm_name> [--acpi] prlctl suspend <vm_id|vm_name> prlctl restart <vm_id|vm_name> prlctl reset <vm_id|vm_name> prlctl reset-uptime <vm_id|vm_name> prlctl stop <vm_id|vm_name> [--kill|--noforce|--acpi|--drop-state] prlctl capture <vm_id|vm_name> --file <name> prlctl snapshot <vm_id|vm_name> [OPTIONS] prlctl snapshot-delete <vm_id|vm_name> -i,--id <snapid> [-c,--children] prlctl snapshot-list <vm_id|vm_name> [-t,--tree] | [-i,--id <snapid>] prlctl snapshot-switch <vm_id|vm_name> -i,--id <snapid> [--skip-resume] prlctl encrypt <vm_id|vm_name> [--dry-run] prlctl decrypt <vm_id|vm_name> [--dry-run] prlctl change-passwd <vm_id|vm_name> prlctl archive <vm_id|vm_name> prlctl unarchive <vm_id|vm_name> prlctl pack <vm_id|vm_name> prlctl unpack <vm_id|vm_name> prlctl protection-set <vm_id|vm_name> prlctl protection-remove <vm_id|vm_name> prlctl problem-report <vm_id|vm_name> <-d,--dump|-s,--send [--proxy [user[:password]@proxyhost[:port]]] [--no-proxy]> [OPTIONS] prlctl guest-debugger <vm_id|vm_name> [--port <port>] prlctl debug-dump <vm_id|vm_name> [--name <dump file name>] [--path <output directory path>] prlctl set <vm_id|vm_name> [OPTIONS]
| null |
To create and start a VM having the name of win2003 and based on the 'Windows XP' template: prlctl create win2003 --ostemplate 'Windows XP' prlctl start win2003 To stop the win2003 VM: prlctl stop win2003 To remove the win2003 virtual machine from the host computer: prlctl delete win2003 SEE ALSO prlsrvctl(8) COPYRIGHT Copyright (C) 2021 Parallels International GmbH. All rights reserved. Parallels Desktop 5 July 2017 prlctl(8)
|
docker-credential-desktop
| null | null | null | null | null |
com.docker.cli
| null | null | null | null | null |
tinkerwell
| null | null | null | null | null |
prl_convert
|
The prl_convert utility is used to convert third-party virtual machines and disks to the Parallels format. If the disk is a data disk, prl_convert converts it to a Parallels virtual disk. If a disk is a system disk, prl_convert converts it to a Parallels virtual machine. If the utility cannot create a virtual machine for the disk (for example, it fails to detect the operating system on the disk), the disk is converted to a Parallels virtual disk.
|
prl_convert - utility for converting third-party virtual machines and disks to the Parallels format.
|
prl_convert <src> [--dst=<path>] [--force] [--allow-no-os] [--allow-no- hdd] [--no-reconfig] [--no-src-check] [--no-hibernate-check] [-r, --reg=<y|n>] [--vbox-home=<path>] [--os-files=<path>] [--err-code] prl_convert <src> --estimate prl_convert -h, --help
|
--estimate Estimate the amount of disk space required to perform the conversion. --dst=<path> Specify the destination directory. If not specified, the default path is used. --force Ignore noncritical errors when converting a virtual machine or hard disk to the Parallels format. --allow-no-os Allow to convert data disks or disks whose operating system cannot be detected. --allow-no-hdd Allow to convert virtual machines that have no virtual hard disks to the Parallels format. --no-reconfig Skip the reconfiguration step of the resulting virtual machine. --no-src-check Don't check the state of the source virtual disk(s). Be careful when using this option - if a virtual machine was running before the conversion, its disk(s) may be inconsistent after the conversion. --no-hibernate-check Do not check whether the guest operating system is hibernated. -r, --reg=<y|n> Register the resulting virtual machine in Parallels Desktop (y by default). --vbox-home=<path> Specify the path to the directory storing the virtual machine configuration files. Use this option only when converting VirtualBox virtual machines. --os-files=<path> Set the path to the operating system installation files. These files may be required when reconfiguring the resulting virtual machine. --err-code Show error codes instead of text messages. -h, --help Show this help message. AUTHOR Parallels International GmbH. http://www.parallels.com COPYRIGHT Copyright (C) 2021 Parallels International GmbH. All rights reserved. Parallels 15 May 2017 prl_convert(8)
| null |
hub-tool
| null | null | null | null | null |
docker-index
| null | null | null | null | null |
aws
| null | null | null | null | null |
prl_perf_ctl
| null | null | null | null | null |
docker-compose
| null | null | null | null | null |
kubectl
| null | null | null | null | null |
aws_completer
| null | null | null | null | null |
fuzzy_match
| null | null | null | null | null |
wkhtmltoimage
|
Converts an HTML page into an image, General Options --allow <path> Allow the file or files from the specified folder to be loaded (repeatable) --bypass-proxy-for <value> Bypass proxy for host (repeatable) --cache-dir <path> Web cache directory --checkbox-checked-svg <path> Use this SVG file when rendering checked checkboxes --checkbox-svg <path> Use this SVG file when rendering unchecked checkboxes --cookie <name> <value> Set an additional cookie (repeatable), value should be url encoded. --cookie-jar <path> Read and write cookies from and to the supplied cookie jar file --crop-h <int> Set height for cropping --crop-w <int> Set width for cropping --crop-x <int> Set x coordinate for cropping --crop-y <int> Set y coordinate for cropping --custom-header <name> <value> Set an additional HTTP header (repeatable) --custom-header-propagation Add HTTP headers specified by --custom-header for each resource request. --no-custom-header-propagation Do not add HTTP headers specified by --custom-header for each resource request. --debug-javascript Show javascript debugging output --no-debug-javascript Do not show javascript debugging output --encoding <encoding> Set the default text encoding, for input -H, --extended-help Display more extensive help, detailing less common command switches -f, --format <format> Output file format --height <int> Set screen height (default is calculated from page content) -h, --help Display help --htmldoc Output program html help --images Do load or print images --no-images Do not load or print images -n, --disable-javascript Do not allow web pages to run javascript --enable-javascript Do allow web pages to run javascript --javascript-delay <msec> Wait some milliseconds for javascript finish --license Output license information and exit --load-error-handling <handler> Specify how to handle pages that fail to load: abort, ignore or skip --load-media-error-handling <handler> Specify how to handle media files that fail to load: abort, ignore or skip --disable-local-file-access Do not allowed conversion of a local file to read in other local files, unless explicitly allowed with --allow --enable-local-file-access Allowed conversion of a local file to read in other local files. --log-level <level> Set log level to: none, error, warn or info --manpage Output program man page --minimum-font-size <int> Minimum font size --password <password> HTTP Authentication password --disable-plugins Disable installed plugins --enable-plugins Enable installed plugins (plugins will likely not work) --post <name> <value> Add an additional post field (repeatable) --post-file <name> <path> Post an additional file (repeatable) -p, --proxy <proxy> Use a proxy --proxy-hostname-lookup Use the proxy for resolving hostnames --quality <int> Output image quality (between 0 and 100) -q, --quiet Be less verbose, maintained for backwards compatibility; Same as using --log-level none --radiobutton-checked-svg <path> Use this SVG file when rendering checked radiobuttons --radiobutton-svg <path> Use this SVG file when rendering unchecked radiobuttons --readme Output program readme --run-script <js> Run this additional javascript after the page is done loading (repeatable) --disable-smart-width Use the specified width even if it is not large enough for the content --enable-smart-width Extend --width to fit unbreakable content --ssl-crt-path <path> Path to the ssl client cert public key in OpenSSL PEM format, optionally followed by intermediate ca and trusted certs --ssl-key-password <password> Password to ssl client cert private key --ssl-key-path <path> Path to ssl client cert private key in OpenSSL PEM format --stop-slow-scripts Stop slow running javascripts --no-stop-slow-scripts Do not Stop slow running javascripts --transparent Make the background transparent in pngs --use-xserver Use the X server (some plugins and other stuff might not work without X11) --user-style-sheet <path> Specify a user style sheet, to load with every page --username <username> HTTP Authentication username -V, --version Output version information and exit --width <int> Set screen width, note that this is used only as a guide line. Use --disable-smart-width to make it strict. --window-status <windowStatus> Wait until window.status is equal to this string before rendering page --zoom <float> Use this zoom factor Contact If you experience bugs or want to request new features please visit <https://wkhtmltopdf.org/support.html> Authors Jakob Truelsen <antialize@gmail.com> Ashish Kulkarni <ashish@kulkarni.dev> Jan Habermann <jan@habermann24.com> Pablo Ruiz García <pablo.ruiz@gmail.com> Trevor North <trevor@blubolt.com> Nate Pinchot <nate.pinchot@gmail.com> pussbb <pussbb@gmail.com> Aaron Stone <aaron@serendipity.cx> Patrick Widauer @a-ctor Peter van der Tak <pta@ibuildgreen.eu> Benjamin Sinkula <bsinky@gmail.com> Kasper F. Brandt <poizan@poizan.dk> Michael Nitze <michael.nitze@online.de> Rok Dvojmoc <rok.dvojmoc@gmail.com> theirix <theirix@gmail.com> Tomsgu <tomasjakll@gmail.com> Artem Butusov <art.sormy@gmail.com> Christian Sciberras <uuf6429@gmail.com> Daniel M. Lambea <dmlambea@gmail.com> Douglas Bagnall <douglas@paradise.net.nz> peterrehm <peter.rehm@renvest.de> Renan Gonçalves <renan.saddam@gmail.com> Ruslan Grabovoy <kudgo.test@gmail.com> Sander Kleykens <sander.kleykens@avnu.be> Adam Thorsen <adam.thorsen@gmail.com> Albin Kerouanton <albin.kerouanton@knplabs.com> Alejandro Dubrovsky <alito@organicrobot.com> Arthur Cinader @acinader Benoit Garret <benoit.garret@gmail.com> Bill Kuker <bkuker@billkuker.com> cptjazz <alexander@jesner.eu> daigot <daigot@rayze.com> Destan Sarpkaya @destan Duncan Smart <duncan.smart@gmail.com> Emil Lerch <emil@lerch.org> Erik Hyrkas <erik.hyrkas@thomsonreuters.com> Erling Linde <erlingwl@gmail.com> Fábio C. Barrionuevo da Luz <bnafta@gmail.com> Fr33m1nd <lukion@gmx.de> Frank Groeneveld <frank@frankgroeneveld.nl> Immanuel Häussermann <haeussermann@gmail.com> Jake Petroules <jake.petroules@petroules.com> James Macdonald <james@kingfisher-systems.co.uk> Jason Smith <JasonParallel@gmail.com> John Muccigrosso @Jmuccigr Julien Le Goff <julego@gmail.com> Kay Lukas <kay.lukas@gmail.com> Kurt Revis <krevis@snoize.com> laura @holamon Marc Laporte <marc@laporte.name> Matthew M. Boedicker <matthewm@boedicker.org> Matthieu Bontemps <matthieu.bontemps@gmail.com> Max Sikstrom <max.sikstrom@op5.com> Nolan Neustaeter <github@noolan.ca> Oleg Kostyuk <cub.uanic@gmail.com> Pankaj Jangid <pankaj.jangid@gmail.com> robinbetts <robinbetts@yahoo.com> Sem <spam@esemi.ru> Stefan Weil <sw@weilnetz.de> Stephen Kennedy <sk4425@gmail.com> Steve Shreeve <steve.shreeve@gmail.com> Sven Nierlein <sven@nierlein.org> Tobin Juday <tobinibot@gmail.com> Todd Fisher <todd.fisher@gmail.com> Костадин Дамянов <maxmight@gmail.com> Emmanuel Bouthenot <kolter@openics.org> Rami @icnocop Khodeir-hubdoc @Khodeir-hubdoc Jonathan Jefferies @jjok Joe Ayers <joseph.ayers@crunchydata.com> Jeffrey Cafferata <jeffrey@jcid.nl> rainabba Mehdi Abbad Lyes Amazouz Pascal Bach Mário Silva 2009 February 23 WKHTMLTOPDF(1)
|
wkhtmltoimage - html to image converter
|
wkhtmltoimage [OPTIONS]... <input file> <output file>
| null | null |
bundler
| null | null | null | null | null |
xrdebug
| null | null | null | null | null |
safaridriver
| null | null | null | null | null |
ptargrep5.30
|
This utility allows you to apply pattern matching to the contents of files contained in a tar archive. You might use this to identify all files in an archive which contain lines matching the specified pattern and either print out the pathnames or extract the files. The pattern will be used as a Perl regular expression (as opposed to a simple grep regex). Multiple tar archive filenames can be specified - they will each be processed in turn.
|
ptargrep - Apply pattern matching to the contents of files in a tar archive
|
ptargrep [options] <pattern> <tar file> ... Options: --basename|-b ignore directory paths from archive --ignore-case|-i do case-insensitive pattern matching --list-only|-l list matching filenames rather than extracting matches --verbose|-v write debugging message to STDERR --help|-? detailed help message
|
--basename (alias -b) When matching files are extracted, ignore the directory path from the archive and write to the current directory using the basename of the file from the archive. Beware: if two matching files in the archive have the same basename, the second file extracted will overwrite the first. --ignore-case (alias -i) Make pattern matching case-insensitive. --list-only (alias -l) Print the pathname of each matching file from the archive to STDOUT. Without this option, the default behaviour is to extract each matching file. --verbose (alias -v) Log debugging info to STDERR. --help (alias -?) Display this documentation. COPYRIGHT Copyright 2010 Grant McLean <grantm@cpan.org> This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.30.3 2024-04-13 PTARGREP(1)
| null |
uux
|
The uux command is used to execute a command on a remote system, or to execute a command on the local system using files from remote systems. The command is not executed immediately; the request is queued until the uucico (8) daemon calls the system and executes it. The daemon is started automatically unless one of the -r or --nouucico options is given. The actual command execution is done by the uuxqt (8) daemon. File arguments can be gathered from remote systems to the execution system, as can standard input. Standard output may be directed to a file on a remote system. The command name may be preceded by a system name followed by an exclamation point if it is to be executed on a remote system. An empty system name is taken as the local system. Each argument that contains an exclamation point is treated as naming a file. The system which the file is on is before the exclamation point, and the pathname on that system follows it. An empty system name is taken as the local system; this must be used to transfer a file to a command being executed on a remote system. If the path is not absolute, it will be appended to the current working directory on the local system; the result may not be meaningful on the remote system. A pathname may begin with ~/, in which case it is relative to the UUCP public directory (usually /usr/spool/uucppublic or /var/spool/uucppublic) on the appropriate system. A pathname may begin with ~name/, in which case it is relative to the home directory of the named user on the appropriate system. Standard input and output may be redirected as usual; the pathnames used may contain exclamation points to indicate that they are on remote systems. Note that the redirection characters must be quoted so that they are passed to uux rather than interpreted by the shell. Append redirection (>>) does not work. All specified files are gathered together into a single directory before execution of the command begins. This means that each file must have a distinct base name. For example, uux 'sys1!diff sys2!~user1/foo sys3!~user2/foo >!foo.diff' will fail because both files will be copied to sys1 and stored under the name foo. Arguments may be quoted by parentheses to avoid interpretation of exclamation points. This is useful when executing the uucp command on a remote system. A request to execute an empty command (e.g., uux sys!) will create a poll file for the specified system. The exit status of uux is one of the codes found in the header file sysexits.h. In particular, EX_OK ( 0 ) indicates success, and EX_TEMPFAIL ( 75 ) indicates a temporary failure.
|
uux - Remote command execution over UUCP
|
uux [ options ] command
|
The following options may be given to uux. -, -p, --stdin Read standard input and use it as the standard input for the command to be executed. -c, --nocopy Do not copy local files to the spool directory. This is the default. If they are removed before being processed by the uucico (8) daemon, the copy will fail. The files must be readable by the uucico (8) daemon, as well as the by the invoker of uux. -C, --copy Copy local files to the spool directory. -l, --link Link local files into the spool directory. If a file can not be linked because it is on a different device, it will be copied unless one of the -c or --nocopy options also appears (in other words, use of --link switches the default from --nocopy to --copy). If the files are changed before being processed by the uucico (8) daemon, the changed versions will be used. The files must be readable by the uucico (8) daemon, as well as by the invoker of uux. -g grade, --grade grade Set the grade of the file transfer command. Jobs of a higher grade are executed first. Grades run 0 ... 9 A ... Z a ... z from high to low. -n, --notification=no Do not send mail about the status of the job, even if it fails. -z, --notification=error Send mail about the status of the job if an error occurs. For many uuxqt daemons, including the Taylor UUCP uuxqt, this is the default action; for those, --notification=error will have no effect. However, some uuxqt daemons will send mail if the job succeeds unless the --notification=error option is used, and some other uuxqt daemons will not send mail if the job fails unless the --notification=error option is used. -r, --nouucico Do not start the uucico (8) daemon immediately; merely queue up the execution request for later processing. -j, --jobid Print jobids on standard output. A jobid will be generated for each file copy operation required to perform the operation. These file copies may be cancelled by passing the jobid to the --kill switch of uustat (1), which will make the execution impossible to complete. -a address, --requestor address Report job status to the specified e-mail address. -x type, --debug type Turn on particular debugging types. The following types are recognized: abnormal, chat, handshake, uucp-proto, proto, port, config, spooldir, execute, incoming, outgoing. Only abnormal, config, spooldir and execute are meaningful for uux. Multiple types may be given, separated by commas, and the --debug option may appear multiple times. A number may also be given, which will turn on that many types from the foregoing list; for example, --debug 2 is equivalent to --debug abnormal,chat. -I file, --config file Set configuration file to use. This option may not be available, depending upon how uux was compiled. -v, --version Report version information and exit. --help Print a help message and exit.
|
uux -z - sys1!rmail user1 Execute the command ``rmail user1'' on the system sys1, giving it as standard input whatever is given to uux as standard input. If a failure occurs, send a message using mail (1). uux 'diff -c sys1!~user1/file1 sys2!~user2/file2 >!file.diff' Fetch the two named files from system sys1 and system sys2 and execute diff putting the result in file.diff in the current directory. The current directory must be writable by the uuxqt (8) daemon for this to work. uux 'sys1!uucp ~user1/file1 (sys2!~user2/file2)' Execute uucp on the system sys1 copying file1 (on system sys1) to sys2. This illustrates the use of parentheses for quoting. RESTRICTIONS The remote system may not permit you to execute certain commands. Many remote systems only permit the execution of rmail and rnews. Some of the options are dependent on the capabilities of the uuxqt (8) daemon on the remote system. SEE ALSO mail(1), uustat(1), uucp(1), uucico(8), uuxqt(8) BUGS Files can not be referenced across multiple systems. Too many jobids are output by --jobid, and there is no good way to cancel a local execution requiring remote files. AUTHOR Ian Lance Taylor (ian@airs.com) Taylor UUCP 1.07 uux(1)
|
cpan
|
This script provides a command interface (not a shell) to CPAN. At the moment it uses CPAN.pm to do the work, but it is not a one-shot command runner for CPAN.pm.
|
cpan - easily interact with CPAN from the command line
|
# with arguments and no switches, installs specified modules cpan module_name [ module_name ... ] # with switches, installs modules with extra behavior cpan [-cfFimtTw] module_name [ module_name ... ] # use local::lib cpan -I module_name [ module_name ... ] # one time mirror override for faster mirrors cpan -p ... # with just the dot, install from the distribution in the # current directory cpan . # without arguments, starts CPAN.pm shell cpan # without arguments, but some switches cpan [-ahpruvACDLOPX]
|
-a Creates a CPAN.pm autobundle with CPAN::Shell->autobundle. -A module [ module ... ] Shows the primary maintainers for the specified modules. -c module Runs a `make clean` in the specified module's directories. -C module [ module ... ] Show the Changes files for the specified modules -D module [ module ... ] Show the module details. This prints one line for each out-of-date module (meaning, modules locally installed but have newer versions on CPAN). Each line has three columns: module name, local version, and CPAN version. -f Force the specified action, when it normally would have failed. Use this to install a module even if its tests fail. When you use this option, -i is not optional for installing a module when you need to force it: % cpan -f -i Module::Foo -F Turn off CPAN.pm's attempts to lock anything. You should be careful with this since you might end up with multiple scripts trying to muck in the same directory. This isn't so much of a concern if you're loading a special config with "-j", and that config sets up its own work directories. -g module [ module ... ] Downloads to the current directory the latest distribution of the module. -G module [ module ... ] UNIMPLEMENTED Download to the current directory the latest distribution of the modules, unpack each distribution, and create a git repository for each distribution. If you want this feature, check out Yanick Champoux's "Git::CPAN::Patch" distribution. -h Print a help message and exit. When you specify "-h", it ignores all of the other options and arguments. -i module [ module ... ] Install the specified modules. With no other switches, this switch is implied. -I Load "local::lib" (think like "-I" for loading lib paths). Too bad "-l" was already taken. -j Config.pm Load the file that has the CPAN configuration data. This should have the same format as the standard CPAN/Config.pm file, which defines $CPAN::Config as an anonymous hash. -J Dump the configuration in the same format that CPAN.pm uses. This is useful for checking the configuration as well as using the dump as a starting point for a new, custom configuration. -l List all installed modules with their versions -L author [ author ... ] List the modules by the specified authors. -m Make the specified modules. -M mirror1,mirror2,... A comma-separated list of mirrors to use for just this run. The "-P" option can find them for you automatically. -n Do a dry run, but don't actually install anything. (unimplemented) -O Show the out-of-date modules. -p Ping the configured mirrors and print a report -P Find the best mirrors you could be using and use them for the current session. -r Recompiles dynamically loaded modules with CPAN::Shell->recompile. -s Drop in the CPAN.pm shell. This command does this automatically if you don't specify any arguments. -t module [ module ... ] Run a `make test` on the specified modules. -T Do not test modules. Simply install them. -u Upgrade all installed modules. Blindly doing this can really break things, so keep a backup. -v Print the script version and CPAN.pm version then exit. -V Print detailed information about the cpan client. -w UNIMPLEMENTED Turn on cpan warnings. This checks various things, like directory permissions, and tells you about problems you might have. -x module [ module ... ] Find close matches to the named modules that you think you might have mistyped. This requires the optional installation of Text::Levenshtein or Text::Levenshtein::Damerau. -X Dump all the namespaces to standard output.
|
# print a help message cpan -h # print the version numbers cpan -v # create an autobundle cpan -a # recompile modules cpan -r # upgrade all installed modules cpan -u # install modules ( sole -i is optional ) cpan -i Netscape::Booksmarks Business::ISBN # force install modules ( must use -i ) cpan -fi CGI::Minimal URI # install modules but without testing them cpan -Ti CGI::Minimal URI Environment variables There are several components in CPAN.pm that use environment variables. The build tools, ExtUtils::MakeMaker and Module::Build use some, while others matter to the levels above them. Some of these are specified by the Perl Toolchain Gang: Lancaster Consensus: <https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md> Oslo Consensus: <https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/oslo-consensus.md> NONINTERACTIVE_TESTING Assume no one is paying attention and skips prompts for distributions that do that correctly. cpan(1) sets this to 1 unless it already has a value (even if that value is false). PERL_MM_USE_DEFAULT Use the default answer for a prompted questions. cpan(1) sets this to 1 unless it already has a value (even if that value is false). CPAN_OPTS As with "PERL5OPT", a string of additional cpan(1) options to add to those you specify on the command line. CPANSCRIPT_LOGLEVEL The log level to use, with either the embedded, minimal logger or Log::Log4perl if it is installed. Possible values are the same as the "Log::Log4perl" levels: "TRACE", "DEBUG", "INFO", "WARN", "ERROR", and "FATAL". The default is "INFO". GIT_COMMAND The path to the "git" binary to use for the Git features. The default is "/usr/local/bin/git". EXIT VALUES The script exits with zero if it thinks that everything worked, or a positive number if it thinks that something failed. Note, however, that in some cases it has to divine a failure by the output of things it does not control. For now, the exit codes are vague: 1 An unknown error 2 The was an external problem 4 There was an internal problem with the script 8 A module failed to install TO DO * one shot configuration values from the command line BUGS * none noted SEE ALSO Most behaviour, including environment variables and configuration, comes directly from CPAN.pm. SOURCE AVAILABILITY This code is in Github in the CPAN.pm repository: https://github.com/andk/cpanpm The source used to be tracked separately in another GitHub repo, but the canonical source is now in the above repo. CREDITS Japheth Cleaver added the bits to allow a forced install (-f). Jim Brandt suggest and provided the initial implementation for the up- to-date and Changes features. Adam Kennedy pointed out that exit() causes problems on Windows where this script ends up with a .bat extension AUTHOR brian d foy, "<bdfoy@cpan.org>" COPYRIGHT Copyright (c) 2001-2015, brian d foy, All Rights Reserved. You may redistribute this under the same terms as Perl itself. perl v5.38.2 2023-11-28 CPAN(1)
|
loads.d
|
These are the same load averages that the "uptime" command prints. The purpose of this script is to demonstrate fetching these values from the DTrace language. The first field is the 1 minute average, the second is the 5 minute, and the third is the 15 minute average. The value represents the average number of runnable threads in the system, a value higher than your CPU (core/hwthread) count may be a sign of CPU saturation. Since this uses DTrace, only users with root privileges can run this command.
|
loads.d - print load averages. Uses DTrace.
|
loads.d
| null |
Print load averages, # loads.d DOCUMENTATION See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with verbose descriptions explaining the output. AUTHOR Brendan Gregg [Sydney, Australia] SEE ALSO uptime(1), dtrace(1M) version 0.90 June 10, 2005 loads.d(1m)
|
htmltree5.30
| null |
htmltree - Parse the given HTML file(s) and dump the parse tree
|
htmltree -D3 -w file1 file2 file3 Options: -D[number] sets HTML::TreeBuilder::Debug to that figure. -w turns on $tree->warn(1) for the new tree -h Help message perl v5.30.3 2024-04-13 HTMLTREE(1)
| null | null |
write
|
The write utility allows you to communicate with other users, by copying lines from your terminal to theirs. When you run the write command, the user you are writing to gets a message of the form: Message from yourname@yourhost on yourtty at hh:mm ... Any further lines you enter will be copied to the specified user's terminal. If the other user wants to reply, they must run write as well. When you are done, type an end-of-file or interrupt character. The other user will see the message ‘EOF’ indicating that the conversation is over. You can prevent people (other than the super-user) from writing to you with the mesg(1) command. If the user you want to write to is logged in on more than one terminal, you can specify which terminal to write to by specifying the terminal name as the second operand to the write command. Alternatively, you can let write select one of the terminals - it will pick the one with the shortest idle time. This is so that if the user is logged in at work and also dialed up from home, the message will go to the right place. The traditional protocol for writing to someone is that the string ‘-o’, either at the end of a line or on a line by itself, means that it is the other person's turn to talk. The string ‘oo’ means that the person believes the conversation to be over. SEE ALSO mesg(1), talk(1), wall(1), who(1) HISTORY A write command appeared in Version 1 AT&T UNIX. BUGS The sender's LC_CTYPE setting is used to determine which characters are safe to write to a terminal, not the receiver's (which write has no way of knowing). macOS 14.5 February 13, 2012 macOS 14.5
|
write – send a message to another user
|
write user [tty]
| null | null |
lwp-mirror5.30
|
This program can be used to mirror a document from a WWW server. The document is only transferred if the remote copy is newer than the local copy. If the local copy is newer nothing happens. Use the "-v" option to print the version number of this program. The timeout value specified with the "-t" option. The timeout value is the time that the program will wait for response from the remote server before it fails. The default unit for the timeout value is seconds. You might append "m" or "h" to the timeout value to make it minutes or hours, respectively. Because this program is implemented using the LWP library, it only supports the protocols that LWP supports. SEE ALSO lwp-request, LWP AUTHOR Gisle Aas <gisle@aas.no> perl v5.30.3 2020-04-14 LWP-MIRROR(1)
|
lwp-mirror - Simple mirror utility
|
lwp-mirror [-v] [-t timeout] <url> <local file>
| null | null |
indent
|
The indent utility is a C program formatter. It reformats the C program in the input-file according to the switches. The switches which can be specified are described below. They may appear before or after the file names. NOTE: If you only specify an input-file, the formatting is done `in- place', that is, the formatted file is written back into input-file and a backup copy of input-file is written in the current directory. If input-file is named ‘/blah/blah/file’, the backup file is named ‘file.BAK’ by default. The extension used for the backup file may be overridden using the SIMPLE_BACKUP_SUFFIX environment variable. If output-file is specified, indent checks to make sure that it is different from input-file. The options listed below control the formatting style imposed by indent. -bacc, -nbacc If -bacc is specified, a blank line is forced around every conditional compilation block. For example, in front of every #ifdef and after every #endif. Other blank lines surrounding such blocks will be swallowed. Default: -nbacc. -bad, -nbad If -bad is specified, a blank line is forced after every block of declarations. Default: -nbad. -badp, -nbadp This is vaguely similar to -bad except that it only applies to the first set of declarations in a procedure (just after the first `{') and it causes a blank line to be generated even if there are no declarations. The default is -nbadp. -bap, -nbap If -bap is specified, a blank line is forced after every procedure body. Default: -nbap. -bbb, -nbbb If -bbb is specified, a blank line is forced before every block comment. Default: -nbbb. -bc, -nbc If -bc is specified, then a newline is forced after each comma in a declaration. -nbc turns off this option. Default: -nbc. -bl, -br Specifying -bl lines up compound statements like this: if (...) { code } Specifying -br (the default) makes them look like this: if (...) { code } -bs, -nbs Whether a blank should always be inserted after sizeof. The default is -nbs. -cn The column in which comments on code start. The default is 33. -cdn The column in which comments on declarations start. The default is for these comments to start in the same column as those on code. -cdb, -ncdb Enables (disables) the placement of comment delimiters on blank lines. With this option enabled, comments look like this: /* * this is a comment */ Rather than like this: /* this is a comment */ This only affects block comments, not comments to the right of code. The default is -cdb. -ce, -nce Enables (disables) forcing of `else's to cuddle up to the immediately preceding `}'. The default is -ce. -cin Sets the continuation indent to be n. Continuation lines will be indented that far from the beginning of the first line of the statement. Parenthesized expressions have extra indentation added to indicate the nesting, unless -lp is in effect or the continuation indent is exactly half of the main indent. -ci defaults to the same value as -i. -clin Causes case labels to be indented n tab stops to the right of the containing switch statement. -cli0.5 causes case labels to be indented half a tab stop. The default is -cli0. -cs, -ncs Control whether parenthesized type names in casts are followed by a space or not. The default is -ncs. -dn Controls the placement of comments which are not to the right of code. For example, -d1 means that such comments are placed one indentation level to the left of code. Specifying the default -d0 lines up these comments with the code. See the section on comment indentation below. -din Specifies the indentation, in character positions, of global variable names and all struct/union member names relative to the beginning of their type declaration. The default is -di16. -dj, -ndj -dj left justifies declarations. -ndj indents declarations the same as code. The default is -ndj. -ei, -nei Enables (disables) special else-if processing. If it is enabled, an if following an else will have the same indentation as the preceding if statement. The default is -ei. -eei, -neei Enables (disables) extra indentation on continuation lines of the expression part of if and while statements. These continuation lines will be indented one extra level. The default is -neei. -fbs, -nfbs Enables (disables) splitting the function declaration and opening brace across two lines. The default is -fbs. -fc1, -nfc1 Enables (disables) the formatting of comments that start in column 1. Often, comments whose leading `/' is in column 1 have been carefully hand formatted by the programmer. In such cases, -nfc1 should be used. The default is -fc1. -fcb, -nfcb Enables (disables) the formatting of block comments (ones that begin with `/*\n'). Often, block comments have been not so carefully hand formatted by the programmer, but reformatting that would just change the line breaks is not wanted. In such cases, -nfcb should be used. Block comments are then handled like box comments. The default is -fcb. -in The number of columns for one indentation level. The default is 8. -ip, -nip Enables (disables) the indentation of parameter declarations from the left margin. The default is -ip. -ln Maximum length of an output line. The default is 78. -lcn Maximum length of an output line in a block comment. The default is 0, which means to limit block comment lines in accordance with -l. -ldin Specifies the indentation, in character positions, of local variable names relative to the beginning of their type declaration. The default is for local variable names to be indented by the same amount as global ones. -lp, -nlp Lines up code surrounded by parentheses in continuation lines. With -lp, if a line has a left paren which is not closed on that line, then continuation lines will be lined up to start at the character position just after the left paren. For example, here is how a piece of continued code looks with -nlp in effect: p1 = first_procedure(second_procedure(p2, p3), third_procedure(p4, p5)); With -lp in effect (the default) the code looks somewhat clearer: p1 = first_procedure(second_procedure(p2, p3), third_procedure(p4, p5)); Inserting two more newlines we get: p1 = first_procedure(second_procedure(p2, p3), third_procedure(p4, p5)); -lpl, -nlpl With -lpl, code surrounded by parentheses in continuation lines is lined up even if it would extend past the right margin. With -nlpl (the default), such a line that would extend past the right margin is moved left to keep it within the margin, if that does not require placing it to the left of the prevailing indentation level. These switches have no effect if -nlp is selected. -npro Causes the profile files, ‘./.indent.pro’ and ‘~/.indent.pro’, to be ignored. -Pfile Read profile from file. -pcs, -npcs If true (-pcs) all procedure calls will have a space inserted between the name and the `('. The default is -npcs. -ps, -nps If true (-ps) the pointer dereference operator (`->') is treated like any other binary operator. The default is -nps. -psl, -npsl If true (-psl) the names of procedures being defined are placed in column 1 - their types, if any, will be left on the previous lines. The default is -psl. -sc, -nsc Enables (disables) the placement of asterisks (`*'s) at the left edge of all comments. The default is -sc. -sob, -nsob If -sob is specified, indent will swallow optional blank lines. You can use this to get rid of blank lines after declarations. Default: -nsob. -st Causes indent to take its input from stdin and put its output to stdout. -ta Automatically add all identifiers ending in "_t" to the list of type keywords. -Ttypename Adds typename to the list of type keywords. Names accumulate: -T can be specified more than once. You need to specify all the typenames that appear in your program that are defined by typedef - nothing will be harmed if you miss a few, but the program will not be formatted as nicely as it should. This sounds like a painful thing to have to do, but it is really a symptom of a problem in C: typedef causes a syntactic change in the language and indent cannot find all instances of typedef. -tsn Assumed distance between tab stops. The default is 8. -Ufile Adds type names from file to the list of type keywords. -ut, -nut Enables (disables) the use of tab characters in the output. The default is -ut. -v, -nv -v turns on `verbose' mode; -nv turns it off. When in verbose mode, indent reports when it splits one line of input into two or more lines of output, and gives some size statistics at completion. The default is -nv. --version Causes indent to print its version number and exit. You may set up your own `profile' of defaults to indent by creating a file called .indent.pro in your login directory and/or the current directory and including whatever switches you like. A `.indent.pro' in the current directory takes precedence over the one in your login directory. If indent is run and a profile file exists, then it is read to set up the program's defaults. Switches on the command line, though, always override profile switches. The switches should be separated by spaces, tabs or newlines. Comments ‘Box’ comments. The indent utility assumes that any comment with a dash or star immediately after the start of comment (that is, `/*-' or `/**') is a comment surrounded by a box of stars. Each line of such a comment is left unchanged, except that its indentation may be adjusted to account for the change in indentation of the first line of the comment. Straight text. All other comments are treated as straight text. The indent utility fits as many words (separated by blanks, tabs, or newlines) on a line as possible. Blank lines break paragraphs. Comment indentation If a comment is on a line with code it is started in the `comment column', which is set by the -cn command line parameter. Otherwise, the comment is started at n indentation levels less than where code is currently being placed, where n is specified by the -dn command line parameter. If the code on a line extends past the comment column, the comment starts further to the right, and the right margin may be automatically extended in extreme cases. Preprocessor lines In general, indent leaves preprocessor lines alone. The only reformatting that it will do is to straighten up trailing comments. It leaves embedded comments alone. Conditional compilation (#ifdef...#endif) is recognized and indent attempts to correctly compensate for the syntactic peculiarities introduced. C syntax The indent utility understands a substantial amount about the syntax of C, but it has a `forgiving' parser. It attempts to cope with the usual sorts of incomplete and malformed syntax. In particular, the use of macros like: #define forever for(;;) is handled properly. ENVIRONMENT The indent utility uses the HOME environment variable. FILES ./.indent.pro profile file ~/.indent.pro profile file HISTORY The indent command appeared in 4.2BSD. BUGS The indent utility has even more switches than ls(1). A common mistake is to try to indent all the C programs in a directory by typing: indent *.c This is probably a bug, not a feature. macOS 14.5 June 28, 2023 macOS 14.5
|
indent – indent and format C program source
|
indent [input-file [output-file]] [-bacc | -nbacc] [-bad | -nbad] [-badp | -nbadp] [-bap | -nbap] [-bbb | -nbbb] [-bc | -nbc] [-bl | -br] [-bs | -nbs] [-cn] [-cdn] [-cdb | -ncdb] [-ce | -nce] [-cin] [-clin] [-cs | -ncs] [-dn] [-din] [-dj | -ndj] [-ei | -nei] [-eei | -neei] [-fbs | -nfbs] [-fc1 | -nfc1] [-fcb | -nfcb] [-in] [-ip | -nip] [-ln] [-lcn] [-ldin] [-lp | -nlp] [-lpl | -nlpl] [-npro] [-Pfile] [-pcs | -npcs] [-ps | -nps] [-psl | -npsl] [-sc | -nsc] [-sob | -nsob] [-st] [-ta] [-Ttypename] [-tsn] [-Ufile] [-ut | -nut] [-v | -nv] [--version]
| null | null |
bzip2recover
|
bzip2 compresses files using the Burrows-Wheeler block sorting text compression algorithm, and Huffman coding. Compression is generally considerably better than that achieved by more conventional LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors. The command-line options are deliberately very similar to those of GNU gzip, but they are not identical. bzip2 expects a list of file names to accompany the command-line flags. Each file is replaced by a compressed version of itself, with the name "original_name.bz2". Each compressed file has the same modification date, permissions, and, when possible, ownership as the corresponding original, so that these properties can be correctly restored at decompression time. File name handling is naive in the sense that there is no mechanism for preserving original file names, permissions, ownerships or dates in filesystems which lack these concepts, or have serious file name length restrictions, such as MS-DOS. bzip2 and bunzip2 will by default not overwrite existing files. If you want this to happen, specify the -f flag. If no file names are specified, bzip2 compresses from standard input to standard output. In this case, bzip2 will decline to write compressed output to a terminal, as this would be entirely incomprehensible and therefore pointless. bunzip2 (or bzip2 -d) decompresses all specified files. Files which were not created by bzip2 will be detected and ignored, and a warning issued. bzip2 attempts to guess the filename for the decompressed file from that of the compressed file as follows: filename.bz2 becomes filename filename.bz becomes filename filename.tbz2 becomes filename.tar filename.tbz becomes filename.tar anyothername becomes anyothername.out If the file does not end in one of the recognised endings, .bz2, .bz, .tbz2 or .tbz, bzip2 complains that it cannot guess the name of the original file, and uses the original name with .out appended. As with compression, supplying no filenames causes decompression from standard input to standard output. bunzip2 will correctly decompress a file which is the concatenation of two or more compressed files. The result is the concatenation of the corresponding uncompressed files. Integrity testing (-t) of concatenated compressed files is also supported. You can also compress or decompress files to the standard output by giving the -c flag. Multiple files may be compressed and decompressed like this. The resulting outputs are fed sequentially to stdout. Compression of multiple files in this manner generates a stream containing multiple compressed file representations. Such a stream can be decompressed correctly only by bzip2 version 0.9.0 or later. Earlier versions of bzip2 will stop after decompressing the first file in the stream. bzcat (or bzip2 -dc) decompresses all specified files to the standard output. bzip2 will read arguments from the environment variables BZIP2 and BZIP, in that order, and will process them before any arguments read from the command line. This gives a convenient way to supply default arguments. Compression is always performed, even if the compressed file is slightly larger than the original. Files of less than about one hundred bytes tend to get larger, since the compression mechanism has a constant overhead in the region of 50 bytes. Random data (including the output of most file compressors) is coded at about 8.05 bits per byte, giving an expansion of around 0.5%. As a self-check for your protection, bzip2 uses 32-bit CRCs to make sure that the decompressed version of a file is identical to the original. This guards against corruption of the compressed data, and against undetected bugs in bzip2 (hopefully very unlikely). The chances of data corruption going undetected is microscopic, about one chance in four billion for each file processed. Be aware, though, that the check occurs upon decompression, so it can only tell you that something is wrong. It can't help you recover the original uncompressed data. You can use bzip2recover to try to recover data from damaged files. Return values: 0 for a normal exit, 1 for environmental problems (file not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt compressed file, 3 for an internal consistency error (eg, bug) which caused bzip2 to panic.
|
bzip2, bunzip2 - a block-sorting file compressor, v1.0.8 bzcat - decompresses files to stdout bzip2recover - recovers data from damaged bzip2 files
|
bzip2 [ -cdfkqstvzVL123456789 ] [ filenames ... ] bunzip2 [ -fkvsVL ] [ filenames ... ] bzcat [ -s ] [ filenames ... ] bzip2recover filename
|
-c --stdout Compress or decompress to standard output. -d --decompress Force decompression. bzip2, bunzip2 and bzcat are really the same program, and the decision about what actions to take is done on the basis of which name is used. This flag overrides that mechanism, and forces bzip2 to decompress. -z --compress The complement to -d: forces compression, regardless of the invocation name. -t --test Check integrity of the specified file(s), but don't decompress them. This really performs a trial decompression and throws away the result. -f --force Force overwrite of output files. Normally, bzip2 will not overwrite existing output files. Also forces bzip2 to break hard links to files, which it otherwise wouldn't do. bzip2 normally declines to decompress files which don't have the correct magic header bytes. If forced (-f), however, it will pass such files through unmodified. This is how GNU gzip behaves. -k --keep Keep (don't delete) input files during compression or decompression. -s --small Reduce memory usage, for compression, decompression and testing. Files are decompressed and tested using a modified algorithm which only requires 2.5 bytes per block byte. This means any file can be decompressed in 2300k of memory, albeit at about half the normal speed. During compression, -s selects a block size of 200k, which limits memory use to around the same figure, at the expense of your compression ratio. In short, if your machine is low on memory (8 megabytes or less), use -s for everything. See MEMORY MANAGEMENT below. -q --quiet Suppress non-essential warning messages. Messages pertaining to I/O errors and other critical events will not be suppressed. -v --verbose Verbose mode -- show the compression ratio for each file processed. Further -v's increase the verbosity level, spewing out lots of information which is primarily of interest for diagnostic purposes. -L --license -V --version Display the software version, license terms and conditions. -1 (or --fast) to -9 (or --best) Set the block size to 100 k, 200 k .. 900 k when compressing. Has no effect when decompressing. See MEMORY MANAGEMENT below. The --fast and --best aliases are primarily for GNU gzip compatibility. In particular, --fast doesn't make things significantly faster. And --best merely selects the default behaviour. -- Treats all subsequent arguments as file names, even if they start with a dash. This is so you can handle files with names beginning with a dash, for example: bzip2 -- -myfilename. --repetitive-fast --repetitive-best These flags are redundant in versions 0.9.5 and above. They provided some coarse control over the behaviour of the sorting algorithm in earlier versions, which was sometimes useful. 0.9.5 and above have an improved algorithm which renders these flags irrelevant. MEMORY MANAGEMENT bzip2 compresses large files in blocks. The block size affects both the compression ratio achieved, and the amount of memory needed for compression and decompression. The flags -1 through -9 specify the block size to be 100,000 bytes through 900,000 bytes (the default) respectively. At decompression time, the block size used for compression is read from the header of the compressed file, and bunzip2 then allocates itself just enough memory to decompress the file. Since block sizes are stored in compressed files, it follows that the flags -1 to -9 are irrelevant to and so ignored during decompression. Compression and decompression requirements, in bytes, can be estimated as: Compression: 400k + ( 8 x block size ) Decompression: 100k + ( 4 x block size ), or 100k + ( 2.5 x block size ) Larger block sizes give rapidly diminishing marginal returns. Most of the compression comes from the first two or three hundred k of block size, a fact worth bearing in mind when using bzip2 on small machines. It is also important to appreciate that the decompression memory requirement is set at compression time by the choice of block size. For files compressed with the default 900k block size, bunzip2 will require about 3700 kbytes to decompress. To support decompression of any file on a 4 megabyte machine, bunzip2 has an option to decompress using approximately half this amount of memory, about 2300 kbytes. Decompression speed is also halved, so you should use this option only where necessary. The relevant flag is -s. In general, try and use the largest block size memory constraints allow, since that maximises the compression achieved. Compression and decompression speed are virtually unaffected by block size. Another significant point applies to files which fit in a single block -- that means most files you'd encounter using a large block size. The amount of real memory touched is proportional to the size of the file, since the file is smaller than a block. For example, compressing a file 20,000 bytes long with the flag -9 will cause the compressor to allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560 kbytes of it. Similarly, the decompressor will allocate 3700k but only touch 100k + 20000 * 4 = 180 kbytes. Here is a table which summarises the maximum memory usage for different block sizes. Also recorded is the total compressed size for 14 files of the Calgary Text Compression Corpus totalling 3,141,622 bytes. This column gives some feel for how compression varies with block size. These figures tend to understate the advantage of larger block sizes for larger files, since the Corpus is dominated by smaller files. Compress Decompress Decompress Corpus Flag usage usage -s usage Size -1 1200k 500k 350k 914704 -2 2000k 900k 600k 877703 -3 2800k 1300k 850k 860338 -4 3600k 1700k 1100k 846899 -5 4400k 2100k 1350k 845160 -6 5200k 2500k 1600k 838626 -7 6100k 2900k 1850k 834096 -8 6800k 3300k 2100k 828642 -9 7600k 3700k 2350k 828642 RECOVERING DATA FROM DAMAGED FILES bzip2 compresses files in blocks, usually 900kbytes long. Each block is handled independently. If a media or transmission error causes a multi-block .bz2 file to become damaged, it may be possible to recover data from the undamaged blocks in the file. The compressed representation of each block is delimited by a 48-bit pattern, which makes it possible to find the block boundaries with reasonable certainty. Each block also carries its own 32-bit CRC, so damaged blocks can be distinguished from undamaged ones. bzip2recover is a simple program whose purpose is to search for blocks in .bz2 files, and write each block out into its own .bz2 file. You can then use bzip2 -t to test the integrity of the resulting files, and decompress those which are undamaged. bzip2recover takes a single argument, the name of the damaged file, and writes a number of files "rec00001file.bz2", "rec00002file.bz2", etc, containing the extracted blocks. The output filenames are designed so that the use of wildcards in subsequent processing -- for example, "bzip2 -dc rec*file.bz2 > recovered_data" -- processes the files in the correct order. bzip2recover should be of most use dealing with large .bz2 files, as these will contain many blocks. It is clearly futile to use it on damaged single-block files, since a damaged block cannot be recovered. If you wish to minimise any potential data loss through media or transmission errors, you might consider compressing with a smaller block size. PERFORMANCE NOTES The sorting phase of compression gathers together similar strings in the file. Because of this, files containing very long runs of repeated symbols, like "aabaabaabaab ..." (repeated several hundred times) may compress more slowly than normal. Versions 0.9.5 and above fare much better than previous versions in this respect. The ratio between worst-case and average-case compression time is in the region of 10:1. For previous versions, this figure was more like 100:1. You can use the -vvvv option to monitor progress in great detail, if you want. Decompression speed is unaffected by these phenomena. bzip2 usually allocates several megabytes of memory to operate in, and then charges all over it in a fairly random fashion. This means that performance, both for compressing and decompressing, is largely determined by the speed at which your machine can service cache misses. Because of this, small changes to the code to reduce the miss rate have been observed to give disproportionately large performance improvements. I imagine bzip2 will perform best on machines with very large caches. CAVEATS I/O error messages are not as helpful as they could be. bzip2 tries hard to detect I/O errors and exit cleanly, but the details of what the problem is sometimes seem rather misleading. This manual page pertains to version 1.0.8 of bzip2. Compressed data created by this version is entirely forwards and backwards compatible with the previous public releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and above, but with the following exception: 0.9.0 and above can correctly decompress multiple concatenated compressed files. 0.1pl2 cannot do this; it will stop after decompressing just the first file in the stream. bzip2recover versions prior to 1.0.2 used 32-bit integers to represent bit positions in compressed files, so they could not handle compressed files more than 512 megabytes long. Versions 1.0.2 and above use 64-bit ints on some platforms which support them (GNU supported targets, and Windows). To establish whether or not bzip2recover was built with such a limitation, run it without arguments. In any event you can build yourself an unlimited version if you can recompile it with MaybeUInt64 set to be an unsigned 64-bit integer. AUTHOR Julian Seward, jseward@acm.org. https://sourceware.org/bzip2/ The ideas embodied in bzip2 are due to (at least) the following people: Michael Burrows and David Wheeler (for the block sorting transformation), David Wheeler (again, for the Huffman coder), Peter Fenwick (for the structured coding model in the original bzip, and many refinements), and Alistair Moffat, Radford Neal and Ian Witten (for the arithmetic coder in the original bzip). I am much indebted for their help, support and advice. See the manual in the source distribution for pointers to sources of documentation. Christian von Roques encouraged me to look for faster sorting algorithms, so as to speed up compression. Bela Lubkin encouraged me to improve the worst-case compression performance. Donna Robinson XMLised the documentation. The bz* scripts are derived from those of GNU gzip. Many people sent patches, helped with portability problems, lent machines, gave advice and were generally helpful. bzip2(1)
| null |
hdiutil
|
hdiutil uses the DiskImages framework to manipulate disk images. Common verbs include attach, detach, verify, create, convert, and compact. The rest of the verbs are currently: help, info, burn, checksum, chpass, erasekeys, imageinfo, isencrypted, mountvol, unmount, plugins, udifrez, udifderez, resize, segment, makehybrid, and pmap. BACKGROUND Disk images are data containers that emulate disks. Like disks, they can be partitioned and formatted. Many common uses of disk images blur the distinction between the disk image container and its content, but this distinction is critical to understanding how disk images work. The terms "attach" and "detach" are used to distinguish the way disk images are connected to and disconnected from a system. "Mount" and "unmount" are the parallel filesystems options. For example, when you double-click a disk image in the macOS Finder, two separate things happen. First, the image is "attached" to the system just like an external drive. Then, the kernel and Disk Arbitration probe the new device for recognized file structures. If any are discovered that should be mounted, the associated volumes will mount and appear on the desktop. When using disk images, always consider whether an operation applies to the blocks of the disk image container or to the (often file-oriented) content of the image. For example, hdiutil verify verifies that the blocks stored in a read-only disk image have not changed since it was created. It does not check whether the filesystem stored within the image is self-consistent (as diskutil verifyVolume would). On the other hand, hdiutil create -srcfolder creates a disk image container, puts a filesystem in it, and then copies the specified files to the new filesystem. COMMON OPTIONS The following option descriptions apply to all verbs: -verbose be verbose: produce extra progress output and error diagnostics. This option can help the user decipher why a particular operation failed. At a minimum, the probing of any specified images will be detailed. -quiet close stdout and stderr, leaving only hdiutil's exit status to indicate success or failure. No /dev entries or mount points will be printed. -debug and -verbose disable -quiet. -debug be very verbose. This option is good if a large amount of progress information is needed. As of Mac OS X 10.6, -debug enables -verbose. Many hdiutil verbs understand the following options: -plist provide result output in plist format. Other programs invoking hdiutil are expected to use -plist rather than try to parse the human-readable output. The usual output is consistent but generally unstructured. -puppetstrings provide progress output that is easy for another program to parse. PERCENTAGE outputs can include the value -1 which means hdiutil is performing an operation that will take an indeterminate amount of time to complete. Any program trying to interpret hdiutil's progress should use -puppetstrings. -srcimagekey key=value specify a key/value pair for the disk image recognition system. (-imagekey is normally a synonym) -tgtimagekey key=value specify a key/value pair for any image created. (-imagekey is only a synonym if there is no input image). -encryption [AES-128|AES-256] specify a particular type of encryption or, if not specified, the default encryption algorithm. As of OS X 10.7, the default algorithm is the AES cipher running in CBC mode on 512-byte blocks with a 128-bit key. -stdinpass read a null-terminated passphrase from standard input. If the standard input is a tty, the passphrase will be read with readpassphrase(3). Otherwise, the password is read from stdin. -stdinpass replaces -passphrase which has been deprecated. -passphrase is insecure because its argument appears in the output of ps(1) where it is visible to other users and processes on the system. See EXAMPLES. -agentpass force the default behavior of prompting for a passphrase. Useful with -pubkey to create an image protected by both a passphrase and a public key. -recover keychain_file specify a keychain containing the secret corresponding to the certificate specified with -certificate when the image was created. -certificate cert_file specify a secondary access certificate for an encrypted image. cert_file must be DER-encoded certificate data, which can be created by Keychain Access or openssl(1). -pubkey PK1,PK2,...,PKn specify a list of public keys, identified by their hexadecimal hashes, to be used to protect the encrypted image being created. -cacert cert specify a certificate authority certificate. cert can be either a PEM file or a directory of certificates processed by c_rehash(1). See also --capath and --cacert in curl(1). -insecurehttp ignore SSL host validation failures. Useful for self- signed servers for which the appropriate certificates are unavailable or if access to a server is desired when the server name doesn't match what is in the certificate. -shadow [shadowfile] Use a shadow file in conjunction with the data in the primary image file. This option prevents modification of the original image and allows read-only images to be attached read/write. When blocks are being read from the image, blocks present in the shadow file override blocks in the base image. All data written to an attached device will be redirected to the shadow file. If not specified, shadowfile defaults to image.shadow. If the shadow file does not exist, it is created. hdiutil verbs taking images as input accept -shadow, -cacert, and -insecurehttp. Verbs that create images automatically append the correct extension to any filenames if the extension is not already present. The creation engine also examines the filename extension of the provided filename and changes its behavior accordingly. For example, a sparse bundle image can be created without specifying -type SPARSEBUNDLE simply by appending the .sparsebundle extension to the provided filename. VERBS Each verb is listed with its description and individual arguments. Arguments to the verbs can be passed in any order. A sector is 512 bytes. help display minimal usage information for each verb. hdiutil verb -help will provide basic usage information for that verb. attach image [options] attach a disk image as a device. attach will return information about an already-attached image as if it had attached it. If any associated volumes are unmounted (and mounting is not suppressed), they will be remounted. mount is a poorly-named synonym for attach. See BACKGROUND. By default, the system applies additional mount options to filesystems backed by untrusted devices like disk images: options like nosuid and quarantine. PERMISSIONS VS. OWNERS explains the behavior of such filesystems and EXAMPLES shows how to override some of the default behavior. The output of attach has been stable since Mac OS X 10.0 (though it was called hdid(8) then) and is intended to be program-readable. It consists of the /dev node, a tab, a content hint (if applicable), another tab, and a mount point (if any filesystems were mounted). Because content hints are derived from the partition data, GUID Partition Table types may leak through. Common GUIDs such as "48465300-0000-11AA- AA11-0030654" are mapped to their human-readable counterparts (here "Apple_HFS"). Common options: -encryption, -stdinpass, -recover, -imagekey, -shadow, -puppetstrings, and -plist. Options: -readonly force the resulting device to be read-only -readwrite attempt to override the DiskImages framework's decision to attach a particular image read-only. For example, -readwrite can be used to modify the HFS+ filesystem on a HFS+/ISO hybrid CD image. -nokernel attach with a helper process. This is (again) the default as of Mac OS X 10.5. -kernel attempt to attach this image without a helper process; fail if unsupported. Only UDRW, UDRO, UDZO, ULFO, and UDSP images are supported in-kernel. Encryption and HTTP are supported by the kernel driver. -notremovable prevent this image from being detached. Only root can use this option. A reboot is necessary to cleanly detach an image attached with -notremovable. -mount required|optional|suppressed indicate whether filesystems in the image should be mounted or not. The default is required (attach will fail if no filesystems mount). -nomount identical to -mount suppressed. -mountroot path mount volumes on subdirectories of path instead of under /Volumes. path must exist. Full mount point paths must be less than MNAMELEN characters (increased from 90 to 1024 in Mac OS X 10.6). -mountrandom path like -mountroot, but mount point directory names are randomized with mkdtemp(3). -mountpoint path assuming only one volume, mount it at path instead of in /Volumes. See fstab(5) for ways a system administrator can make particular volumes automatically mount in particular filesystem locations by editing the file /etc/fstab. -nobrowse render any volumes invisible in applications such as the macOS Finder. -owners on|off specify that owners on any filesystems be honored or not. -drivekey key=value specify a key/value pair to be set on the device in the IOKit registry. -section subspec Attach a subsection of a disk image. subspec is any of <offset>, <first-last>, or <start,count> in 0-based sectors. Ranges are inclusive. The following options have corresponding elements in the com.apple.frameworks.diskimages preferences domain and thus can be rendered in both the positive and the negative to override any existing preferences. -[no]verify do [not] verify the image. By default, hdiutil attach attempts to intelligently verify images that contain checksums before attaching them. If hdiutil can write to an image it has verified, attach will store an attribute with the image so that it will not be verified again unless its timestamp changes. To maintain backwards compatibility, hdid(8) does not attempt to verify images before attaching them. Preferences keys: skip-verify, skip-verify- remote, skip-verify-locked, skip-previously- verified -[no]ignorebadchecksums specify whether bad checksums should be ignored. The default is to abort when a bad checksum is detected. Preferences key: ignore-bad-checksums -[no]autoopen do [not] auto-open volumes (in the Finder) after attaching an image. By default, double-clicking a read-only disk image causes the resulting volume to be opened in the Finder. hdiutil defaults to -noautoopen. -[no]autoopenro do [not] auto-open read-only volumes. Preferences key: auto-open-ro-root -[no]autoopenrw do [not] auto-open read/write volumes. Preferences key: auto-open-rw-root -[no]autofsck do [not] force automatic file system checking before mounting a disk image. By default, only quarantined images (e.g. downloaded from the Internet) that have not previously passed fsck are checked. Preferences key: auto-fsck detach dev_name [-force] detach a disk image and terminate any associated process. dev_name is a partial /dev node path (e.g. "disk1"). As of Mac OS X 10.4, dev_name can also be a mountpoint. If Disk Arbitration is running, detach will use it to unmount any filesystems and detach the image. If not, detach will attempt to unmount any filesystems and detach the image directly (using the ‘eject’ ioctl). If Disk Arbitration is not running, it may be necessary to unmount the filesystems with umount(8) before detaching the image. eject is a synonym for detach. In common operation, detach is very similar to diskutil(8)'s eject. Options: -force ignore open files on mounted volumes, etc. verify image [options] compute the checksum of a "read-only" or "compressed" image and verify it against the value stored in the image. Read/write images don't contain checksums and thus can't be verified. verify accepts the common options -encryption, -stdinpass, -srcimagekey, -puppetstrings, and -plist. create size_spec image create a new image of the given size or from the provided data. If image already exists, -ov must be specified or create will fail. To make a cross-platform CD or DVD, use makehybrid instead. See also EXAMPLES below. The size specified is the size of the image to be created. Filesystem and partition layout overhead (80 sectors for the default GPTSPUD layout on Intel machines) may not be available for the filesystem and user data in the image. Size specifiers: -size ??b|??k|??m|??g|??t|??p|??e Specify the size of the image in the style of mkfile(8) with the addition of tera-, peta-, and exa-bytes sizes (note that 'b' specifies a number of sectors, not bytes). The larger sizes are useful for large sparse images. -sectors sector_count Specify the size of the image file in 512-byte sectors. -megabytes size Specify the size of the image file in megabytes (1024*1024 bytes). -srcfolder source copies file-by-file the contents of source into image, creating a fresh (theoretically defragmented) filesystem on the destination. The resulting image is thus recommended for use with asr(8) since it will have a minimal amount of unused space. Its size will be that of the source data plus some padding for filesystem overhead. The filesystem type of the image volume will match that of the source as closely as possible unless overridden with -fs. Other size specifiers, such as -size, will override the default size calculation based on the source content, allowing for more or less free space in the resulting filesystem. -srcfolder can be specified more than once, in which case the image volume will be populated at the top level with a copy of each specified filesystem object. -srcdir is a synonym. -srcdevice device specifies that the blocks of device should be used to create a new image. The image size will match the size of device. resize can be used to adjust the size of resizable filesystems and writable images. Both -srcdevice and -srcfolder can run into errors if there are bad blocks on a disk. One way around this problem is to write over the files in question in the hopes that the drive will remap the bad blocks. Data will be lost, but the image creation operation will subsequently succeed. Filesystem options (like -fs, -volname, -stretch, or -size) are invalid and ignored when using -srcdevice. With APFS, imaging from a device that is an individual APFS volume is invalid. To create a valid APFS disk image, device needs to be an APFS container or contain an APFS container partition. Common options: -encryption, -stdinpass, -certificate, -pubkey, -imagekey, -tgtimagekey, -puppetstrings, and -plist. -imagekey di-sparse-puma-compatible=TRUE and -imagekey di-shadow-puma-compatible=TRUE will create, respectively, sparse and shadow images that can be attached on Mac OS X 10.1. General options: -align alignment specifies a size to which the final data partition will be aligned. The default is 4K. -type UDIF|SPARSE|SPARSEBUNDLE -type is particular to create and is used to specify the format of empty read/write images. It is independent of -format which is used to specify the final read-only image format when populating an image with pre-existing content. UDIF is the default type. If specified, a UDRW of the specified size will be created. SPARSE creates a UDSP: a read/write single-file image which expands as is is filled with data. SPARSEBUNDLE creates a UDSB: a read/write image backed by a directory bundle. By default, UDSP images grow one megabyte at a time. Introduced in 10.5, UDSB images use 8 MB band files which grow as they are written to. -imagekey sparse-band-size=size can be used to specify the number of 512-byte sectors that will be added each time the image grows. Valid values for SPARSEBUNDLE range from 2048 to 16777216 sectors (1 MB to 8 GB). The maximum size of a SPARSE image is 128 petabytes; the maximum for SPARSEBUNDLE is just under 8 exabytes (2^63 - 512 bytes). The amount of data that can be stored in either type of sparse image is additionally bounded by the filesystem in the image and by any partition map. compact can reclaim unused bands in sparse images backing APFS or HFS+ filesystems. resize will only change the virtual size of a sparse image. See also USING PERSISTENT SPARSE IMAGES below. -fs filesystem where filesystem is one of several options such as HFS+, HFS+J (JHFS+), HFSX, JHFS+X, APFS, FAT32, ExFAT, or UDF. A full list of supported filesystems can be found in create -help. -fs causes a filesystem of the specified type to be written to the image. The default file system is APFS. If -partitionType and/or -layout are specified, but -fs is not specified, no file system will be created. -fs may change the partition scheme and type appropriately. -fs will not make any size adjustments: if the image is the wrong size for the specified filesystem, create will fail. -fs is invalid and ignored when using -srcdevice. -volname volname The newly-created filesystem will be named volname. The default depends the filesystem being used; The default volume name in both HFS+ and APFS is ‘untitled’. -volname is invalid and ignored when using -srcdevice. -uid uid the root of the newly-created volume will be owned by the given numeric user id. 99 maps to the magic ‘unknown’ user (see PERMISSIONS VS. OWNERS). -gid gid the root of the newly-created volume will be owned by the given numeric group id. 99 maps to ‘unknown’. -mode mode the root of the newly-created volume will have mode (in octal) mode. The default mode is determined by the filesystem's newfs unless -srcfolder is specified, in which case the default mode is derived from the specified filesystem object. -[no]autostretch do [not] suppress automatically making backwards- compatible stretchable volumes when the volume size crosses the auto-stretch-size threshold (default: 256 MB). See also asr(8). -stretch max_stretch -stretch initializes HFS+ filesystem data such that it can later be stretched on older systems (which could only stretch within predefined limits) using hdiutil resize or by asr(8). max_stretch is specified like -size. -stretch is invalid and ignored when using -srcdevice. -fsargs newfs_args additional arguments to pass to whichever newfs program is implied by -fs. As an example with HFS+, newfs_hfs(8) has a number of options that can control the amount of space used by the filesystem's data structures. -layout layout Specify the partition layout of the image. layout can be anything supported by MediaKit.framework. NONE creates an image with no partition map. When such an image is attached, a single /dev entry will be created (e.g. /dev/disk1). ‘SPUD’ causes a DDM and an Apple Partition Scheme partition map with a single entry to be written. ‘GPTSPUD’ creates a similar image but with a GUID Partition Scheme map instead. When attached, multiple /dev entries will be created, with either slice 1 (GPT) or slice 2 (APM) as the data partition. (e.g. /dev/disk1, /dev/disk1s1, /dev/disk1s2). Unless overridden by -fs, the default layout is ‘GPTSPUD’ (PPC systems used ‘SPUD’ prior to Mac OS X 10.6). Other layouts include ‘MBRSPUD’ and ‘ISOCD’. create -help lists all supported layouts. -library bundle specify an alternate layout library. The default is MediaKit's MKDrivers.bundle. -partitionType partition_type Change the type of partition in a single-partition disk image. -ov overwrite an existing file. The default is not to overwrite existing files. -attach attach the image after creating it. If no filesystem is specified via -fs, the attach will fail per the default attach -mount required behavior. Image from source options (for -srcfolder and -srcdevice): -format format Specify the final image format. The default when a source is specified is UDZO. format can be any of the format parameters used by convert. Options specific to -srcdevice: -segmentSize size_spec Note that segmented images are deprecated. Specify that the image should be written in segments no bigger than size_spec (which follows -size conventions). Options specific to -srcfolder: -[no]crossdev do [not] cross device boundaries on the source filesystem. -[no]scrub do [not] skip temporary files when imaging a volume. Scrubbing is the default when the source is the root of a mounted volume. Scrubbed items include trashes, temporary directories, swap files, etc. -[no]anyowners do not fail if the user invoking hdiutil can't ensure correct file ownership for the files in the image. -skipunreadable skip files that can't be read by the copying user and don't authenticate. -[no]atomic do [not] copy files to a temporary location and then rename them to their destination. Atomic copies are the default. Non-atomic copying may be slightly faster. -copyuid user perform the copy as the given user. Requires root privilege. If user can't read or create files with the needed owners, -anyowners or -skipunreadable must be used to prevent the operation from failing. By default, create -srcfolder attempts to maintain the permissions present in the source directory. It prompts for authentication if it detects an unreadable file, a file owned by someone other than the user creating the image, or a SGID file in a group that the copying user is not in. convert image -format format -o outfile convert image to type format and write the result to outfile. As with create, the correct filename extension will be added only if it isn't part of the provided name. Format is one of: UDRW - UDIF read/write image UDRO - UDIF read-only image UDCO - UDIF ADC-compressed image UDZO - UDIF zlib-compressed image ULFO - UDIF lzfse-compressed image (OS X 10.11+ only) ULMO - UDIF lzma-compressed image (macOS 10.15+ only) UDBZ - UDIF bzip2-compressed image (deprecated) UDTO - DVD/CD-R master for export UDSP - SPARSE (grows with content) UDSB - SPARSEBUNDLE (grows with content; bundle-backed) UFBI - UDIF entire image with MD5 checksum In addition to the compression offered by some formats, the UDIF read-only format skips unused space in HFS, APFS, ExFAT, and MS-DOS (FAT, FAT32) filesystems. For UDZO, -imagekey zlib-level=value allows the zlib compression level to be specified a la gzip(1). The default compression level is 1 (fastest). Common options: -encryption, -stdinpass, -certificate, -srcimagekey, -tgtimagekey, -shadow and related, -puppetstrings, and -plist. Other options: -align alignment The default is 4 (2K). -pmap add partition map. When converting an unpartitioned UDIF, the default is true. -segmentSize [size_spec] Note that segmented images are deprecated. Specify segmentation into size_spec-sized segments as outfile is being written. The default size_spec when -segmentSize is specified alone is 2*1024*1024 (1 GB worth of sectors) for UDTO images and 4*1024*1024 (2 GB segments) for all other image types. size_spec can also be specified ??b|??k|??m|??g|??t|??p|??e like create's -size flag. -tasks task_count When converting an image into a compressed format, specify the number of threads to use for the compression operation. The default is the number of processors active in the current system. burn image Burn image to optical media in an attached burning device. In all cases, a prompt for media will be printed once an appropriate drive has been found. Common options: -shadow and related, -srcimagekey, -encryption, -puppetstrings, and -stdinpass. Other options: -device specify a device to use for burning. See -list. -testburn don't turn on laser (laser defaults to on). -anydevice explicitly allow burning to devices not qualified by Apple (kept for backwards compatibility as burn will burn to any device by default as of Mac OS X 10.4). -[no]eject do [not] eject disc after burning. The default is to eject the disc. -[no]verifyburn do [not] verify disc contents after burn. The default is to verify. -[no]addpmap do [not] add partition map if necessary. Some filesystem types will not be recognized when stored on optical media unless they are enclosed in a partition map. This option will add a partition map to any bare filesystem which needs a partition map in order to be recognized when burned to optical media. The default is to add the partition map if needed. -[no]skipfinalfree do [not] skip final free partition. If there is a partition map on the image specifying an Apple_Free partition as the last partition, that Apple_Free partition will not be burned. The burned partition map will still reference the empty space. The default is to skip burning a final free partition. -[no]optimizeimage do [not] optimize filesystem for burning. Optimization can reduce the size of an HFS+ volume to the size of the data contained on the volume. This option will change what is burned such that the disc will have a different checksum than the image it came from. The default is to burn all blocks of the disk image (minus any trailing Apple_Free). -[no]forceclose do [not] force the disc to be closed after burning. Further burns to the disc will be impossible. The default is not to close the disc. -nounderrun Disable the default buffer underrun protection. -[no]synthesize [Don't] Synthesize a hybrid filesystem for the disc. The default is to create a new (HFS+/ISO) filesystem when burning the source image's blocks would not result in a valid disc. -speed x_factor 1, 2, 4, 6, ... ‘max’ The desired "x-factor".e.g. 8 means the drive will be instructed burn at "8x speed".‘max’ will cause the burn to proceed at the maximum speed of the drive. ‘max’ is the default speed. Slower speeds can produce more reliable burns. The speed factor is relative to the media being burned (e.g. -speed 2 has a different data rate when used for a DVD burn vs. a CD burn). Note that some drives have a minimum burn speed in which case any slower speed specified will result in a burn at the drive's minimum speed. -sizequery calculate the size of disc required without burning anything. The size is returned in sectors. -erase prompt for optical media (DVD-RW/CD-RW) and then, if the hardware supports it, quickly erase the media. If an image is specified, it will be burned to the media after the media has been erased. -fullerase erase all sectors of the disc. This usually takes quite a bit longer than -erase. -list list all burning devices, with OpenFirmware paths suitable for -device. makehybrid -o image source Generate a potentially-hybrid filesystem in a read-only disk image using the DiscRecording framework's content creation system. This disk image will represent a data disc. drutil(1) can be used to make audio discs. source can either be a directory or a disk image. The generated image can later be burned using burn, or converted to another read-only format with convert. By default, the filesystem will be readable on most modern computing platforms. The generated filesystem is not intended for conversion to read/write, but can safely have its files copied to a read/write filesystem using ditto(8). hdiutil supports generating El Torito-style bootable ISO9660 filesystems, which are commonly used for booting x86-based hardware. The specification includes several emulation modes. By default, an El Torito boot image emulates either a 1.2MB, 1.44MB, or 2.88MB floppy drive, depending on the size of the image. Also available are "No Emulation" and "Hard Disk Emulation" modes, which allow the boot image to either be loaded directly into memory, or be virtualized as a partitioned hard disk, respectively. The El Torito options should not be used for data CDs. Filesystem options: -hfs Generate an HFS+ filesystem. This filesystem can be present on an image simultaneously with an ISO9660 or Joliet or UDF filesystem. On operating systems that understand HFS+ as well as ISO9660 and UDF, like Mac OS 9 or OS X, HFS+ is usually the preferred filesystem for hybrid images. -iso Generate an ISO9660 Level 2 filesystem with Rock Ridge extensions. This filesystem can be present on an image simultaneously with an HFS+ or Joliet or UDF filesystem. ISO9660 is the standard cross-platform interchange format for CDs and some DVDs, and is understood by virtually all operating systems. If an ISO9660 or Joliet filesystem is present on a disk image or CD, but not HFS+, OS X will use the ISO9660 (or Joliet) filesystem. -joliet Generate Joliet extensions to ISO9660. This view of the filesystem can be present on an image simultaneously with HFS+, and requires the presence of an ISO9660 filesystem. Joliet supports Unicode filenames, but is only supported on some operating systems. If both an ISO9660 and Joliet filesystem are present on a disk image or CD, but not HFS+, OS X will prefer the Joliet filesystem. -udf Generate a UDF filesystem. This filesystem can be present on an image simultaneously with HFS+, ISO9660, and Joliet. UDF is the standard interchange format for DVDs, although operating system support varies based on OS version and UDF version. By default, if no filesystem is specified, the image will be created with all four filesystems as a hybrid image. When multiple filesystems are selected, the data area of the image is shared between all filesystems, and only directory information and volume meta-data are unique to each filesystem. This means that creating a cross-platform ISO9660/HFS+ hybrid has a minimal overhead when compared to a single filesystem image. Other options (most take a single argument): -hfs-blessed-directory Path to directory which should be "blessed" for OS X booting on the generated filesystem. This assumes the directory has been otherwise prepared, for example with bless -bootinfo to create a valid BootX file. (HFS+ only). -hfs-openfolder Path to a directory that will be opened by the Finder automatically. See also the -openfolder option in bless(8) (HFS+ only). -hfs-startupfile-size Allocate an empty HFS+ Startup File of the specified size, in bytes (HFS+ only). -abstract-file Path to a file in the source directory (and thus the root of the generated filesystem) for use as the ISO9660/Joliet Abstract file (ISO9660/Joliet). -bibliography-file Path to a file in the source directory (and thus the root of the generated filesystem) for use as the ISO9660/Joliet Bibliography file (ISO9660/Joliet). -copyright-file Path to a file in the source directory (and thus the root of the generated filesystem) for use as the ISO9660/Joliet Copyright file (ISO9660/Joliet). -application Application string (ISO9660/Joliet). -preparer Preparer string (ISO9660/Joliet). -publisher Publisher string (ISO9660/Joliet). -system-id System Identification string (ISO9660/Joliet). -keep-mac-specific Expose Macintosh-specific files (such as .DS_Store) in non-HFS+ filesystems (ISO9660/Joliet). -eltorito-boot Path to an El Torito boot image within the source directory. By default, floppy drive emulation is used, so the image must be one of 1200KB, 1440KB, or 2880KB. If the image has a different size, either -no-emul-boot or -hard-disk-boot must be used to enable "No Emulation" or "Hard Disk Emulation" mode, respectively (ISO9660/Joliet). -hard-disk-boot Use El Torito Hard Disk Emulation mode. The image must represent a virtual device with an MBR partition map and a single partition -no-emul-boot Use El Torito No Emulation mode. The system firmware will load the number of sectors specified by -boot-load-size and execute it, without emulating any devices (ISO9660/Joliet). -no-boot Mark the El Torito image as non- bootable. The system firmware may still create a virtual device backed by this data. This option is not recommended (ISO9660/Joliet). -boot-load-seg For a No Emulation boot image, load the data at the specified segment address. This options is not recommended, so that the system firmware can use its default address (ISO9660/Joliet) -boot-load-size For a No Emulation boot image, load the specified number of 512-byte emulated sectors into memory and execute it. By default, 4 sectors (2KB) will be loaded (ISO9660/Joliet). -eltorito-platform Use the specified numeric platform ID in the El Torito Boot Catalog Validation Entry or Section Header. Defaults to 0 to identify x86 hardware (ISO/Joliet). -eltorito-specification For complex layouts involving multiple boot images, a plist-formatted string can be provided, using either OpenStep- style syntax or XML syntax, representing an array of dictionaries. Any of the El Torito options can be set in the sub-dictionaries and will apply to that boot image only. If -eltorito-specification is provided in addition to the normal El Torito command-line options, the specification will be used to populate secondary non- default boot entries. -udf-version Version of UDF filesystem to generate. This can be either "1.02" or "1.50". If not specified, it defaults to "1.50" (UDF). -default-volume-name Default volume name for all filesystems, unless overridden. If not specified, defaults to the last path component of source. -hfs-volume-name Volume name for just the HFS+ filesystem if it should be different (HFS+ only). -iso-volume-name Volume name for just the ISO9660 filesystem if it should be different (ISO9660 only). -joliet-volume-name Volume name for just the Joliet filesystem if it should be different (Joliet only). -udf-volume-name Volume name for just the UDF filesystem if it should be different (UDF only). -hide-all A glob expression of files and directories that should not be exposed in the generated filesystems. The string may need to be quoted to avoid shell expansion, and will be passed to glob(3) for evaluation. Although this option cannot be used multiple times, an arbitrarily complex glob expression can be used. -hide-hfs A glob expression of files and directories that should not be exposed via the HFS+ filesystem, although the data may still be present for use by other filesystems (HFS+ only). -hide-iso A glob expression of files and directories that should not be exposed via the ISO filesystem, although the data may still be present for use by other filesystems (ISO9660 only). Per above, the Joliet hierarchy will supersede the ISO hierarchy when the hybrid is mounted as an ISO 9660 filesystem on OS X. Therefore, if Joliet is being generated (the default) -hide-joliet will also be needed to hide the file from mount_cd9660(8). -hide-joliet A glob expression of files and directories that should not be exposed via the Joliet filesystem, although the data may still be present for use by other filesystems (Joliet only). Because OS X's ISO 9660 filesystem uses the Joliet catalog if it is available, -hide-joliet effectively supersedes -hide-iso when the resulting filesystem is mounted as ISO on OS X. -hide-udf A glob expression of files and directories that should not be exposed via the UDF filesystem, although the data may still be present for use by other filesystems (UDF only). -only-udf A glob expression of objects that should only be exposed in UDF. -only-iso A glob expression of objects that should only be exposed in ISO. -only-joliet A glob expression of objects that should only be exposed in Joliet. -print-size Preflight the data and calculate an upper bound on the size of the image. The actual size of the generated image is guaranteed to be less than or equal to this estimate. -plistin Instead of using command-line parameters, use a standard plist from standard input to specific the parameters of the hybrid image generation. Each command-line option should be a key in the dictionary, without the leading "-", and the value should be a string for path and string arguments, a number for number arguments, and a boolean for toggle options. The source argument should use a key of "source" and the image should use a key of "output". If a disk image was specified for source, the image will be attached and paths will be evaluated relative to the mountpoint of the image. No absolute paths can be used in this case. If source is a directory, all argument paths should point to files or directories either via an absolute path, or via a relative path to the current working directory. The volume name options, just like files in the filesystems, may need to be mapped onto the legal character set for a given filesystem or otherwise changed to obey naming restrictions. Use drutil(1) as drutil filename myname to see how a given string would be remapped. The -abstract-file, -bibliography-file, -and -copyright-file must exist directly in the source directory, not a sub- directory, and must have an 8.3 name for compatibility with ISO9660 Level 1. compact image [options] scans the bands of a sparse (SPARSE or SPARSEBUNDLE) disk image containing an APFS or HFS+ filesystem, removing those parts of the image which are no longer being used by the filesystem. Depending on the location of files in the hosted filesystem, compact may or may not shrink the image. For SPARSEBUNDLE images, completely unused band files are simply removed. Options: -batteryallowed allow compacting on battery power. SPARSE images could be damaged if power is lost during a compact operation. The default is not allowed. -sleepallowed allow machine to idle sleep while compacting, which cancels the compact operation. The default is not allowed, which prevents idle sleep until compact completes. User-initiated sleep, such as a lid close, will always cancel compact. Common options: -encryption, -stdinpass, -srcimagekey, -shadow and related, -puppetstrings, and -plist. info display information about DiskImages.framework, the disk image driver, and any images that are currently attached. hdiutil info accepts -plist. checksum image -type type Calculate the specified checksum on the image data, regardless of image type. Common options: -shadow and related, -encryption, -stdinpass, -srcimagekey, -puppetstrings, and -plist. type is one of: UDIF-CRC32 - CRC-32 image checksum UDIF-MD5 - MD5 image checksum CRC32 - CRC-32 MD5 - MD5 SHA - SHA SHA1 - SHA-1 SHA256 - SHA-256 SHA384 - SHA-384 SHA512 - SHA-512 chpass image change the passphrase for an encrypted image. The default is to change the password interactively. Common options: -recover and -srcimagekey. The options -oldstdinpass and -newstdinpass allow, in the order specified, the null-terminated old and new passwords to be read from the standard input in the same manner as with -stdinpass. erasekeys image delete keys used to access an encrypted image, quickly rendering the image inaccessible. This does not prevent other copies of the keys from later being broken and used to decrypt the data, such as from a copy or backup of the image. In addition, modern storage systems such as solid state disks do not securely overwrite data. As a result, erasekeys cannot protect against all attacks, but it may prevent trivial access. Common options: -plist and -quiet. fsid image Print information about filesystems on a given disk image. Per DEVICE SPECIAL FILES, image can be a /dev entry corresponding to a disk. More detailed information is presented for HFS+ filesystems. Common options: -encryption, -stdinpass, -srcimagekey, and -shadow and related. mountvol dev_name mount the filesystem in dev_name using Disk Arbitration (similar to diskutil(8)'s mount). XML output is available from -plist. Note that mountvol (rather than mount, though it often works in Mac OS X 10.5 and later) is the correct way to remount a volume after it has been unmounted by unmount. Prior to Mac OS X 10.5, mount/attach would treat a /dev entry as a disk image to be attached (creating another /dev entry). That behavior was undesirable. unmount volume [-force] unmount a mounted volume without detaching any associated image. Volume is a /dev entry or mountpoint. NOTE: unmount does NOT detach any disk image associated with the volume. Images are attached and detached; volumes are mounted and unmounted. hdiutil mountvol (or diskutil mount) will remount a volume that has been unmounted by hdiutil unmount. Options: -force unmount filesystem regardless of open files on that filesystem. Similar to umount -f. imageinfo image [options] Print out information about a disk image. Options are any of: -format only print out the image format -checksum only print out the image checksum Common options: -encryption, -stdinpass, -srcimagekey, -shadow and related, and -plist. isencrypted image print a line indicating whether image is encrypted. If it is, additional details are printed. Common options: -plist. plugins print information about DiskImages framework plugins. The user, system, local, and network domains are searched for plugins (i.e. ~/Library/Plug-ins/DiskImages, /System/Library/Plug-ins/DiskImages, /Library/Plug-ins/DiskImages, /Network/Library/Plug-ins/DiskImages). Common options: -plist. resize size_spec image Resize a disk image or the containers within it. For an image containing a trailing Apple_HFS partition, the default is to resize the image container, the partition, and the filesystem within it by aligning the end of the hosted structures with the end of the image. hdiutil resize cannot resize filesystems other than HFS+ and its variants. resize can shrink an image so that its HFS+ partition can be converted to CD-R/DVD-R format and still be burned. hdiutil resize will not reclaim gaps because it does not move data. diskutil(8)'s resize can move filesystem data which can help hdiutil resize create a minimally-sized image. -fsargs can also be used to minimize filesystem gaps inside an image. resize is limited by the disk image container format (e.g. UDSP vs. UDSB), any partition scheme, the hosted filesystem, and the filesystem hosting the image. In the case of HFS+ inside of GPT inside of a UDRW on HFS+ with adequate free space, the limit is approximately 2^63 bytes. Older images created with an APM partition scheme are limited by it to 2TB. Before Mac OS X 10.4, resize was limited by how the filesystem was created (see hdiutil create -stretch). hdiutil burn does not burn Apple_Free partitions at the end of the devices, so an image with a resized filesystem can be burned to create a CD-R/DVD-R master that contains only the actual data in the hosted filesystem (assuming minimal data fragmentation). Common options: -encryption, -stdinpass, -srcimagekey, -shadow and related, and -plist. Size specifiers: -size ??b|??k|??m|??g|??t|??p|??e -sectors sector_count | min Specify the number of 512-byte sectors to which the partition should be resized. If this falls outside the mininum valid value or space remaining on the underlying file system, an error will be returned and the partition will not be resized. min automatically determines the smallest possible size. Other options: -imageonly only resize the image file, not the partition(s) and filesystems inside of it. -partitiononly only resize a partition / filesystem in the image, not the image. -partitiononly will fail if the new size won't fit inside the image. On APM, shrinking a partition results in an explicit Apple_Free entry taking up the remaining space in the image. -partitionID partitionID specifies which partition to resize (UDIF only -- see HISTORY below). partitionID is 1-based. -nofinalgap allow resize to entirely eliminate the trailing free partition in an APM map. Restoring such images to very old hardware may interfere with booting. -limits Displays the minimum, current, and maximum sizes (in 512-byte sectors) for the image. In addition to any hosted filesystem constraints, UDRW images are constrained by available disk space in the filesystem hosting the image. -limits does not modify the image. segment NOTE: hdiutil segment command is deprecated segment -o firstSegname -segmentCount #segs image [opts] segment -o firstSegname -segmentSize size image [opts] segment an UDIF disk image. Segmented images work around limitations in file size which are sometimes imposed by filesystems, network protocols, or media. Note: whether or not the segments are encrypted is determined by the options passed to segment and not by the state of the source image. Common options: -encryption, -stdinpass, -srcimagekey, -tgtimagekey, -puppetstrings, and -plist. Options: -segmentCount segment_count Specify the number of segments. Only one of -segmentCount or -segmentSize will be honored. -segmentSize segment_size Specify the segment size in sectors or in the style of mkfile(8) (here unqualified numbers are still sectors). If the original image size is not an exact multiple of the segment size, the last segment will be shorter than the others. Only one of -segmentCount or -segmentSize will be honored. Segmenting read/write (UDRW) images is not supported (as of Mac OS X 10.3). -firstSegmentSize segment_size Specify the first segment size in sectors in the same form as for -segmentSize. Used for multi- CD restores. -restricted Make restricted segments for use in multi-CD restores. -ov overwrite any existing files. pmap [options] image display the partition map of an image or device. By default, this report includes starting offsets and significant amounts of free space. image is either a disk image or /dev/disk entry (see DEVICE SPECIAL FILES). Common options: -encryption, -stdinpass, -srcimagekey, and -shadow and related. -simple generate MediaKit's minimal report: basic partition types, names, and sizes in human- readable units. -standard generate MediaKit's standard report, which adds partition offsets and uses 512-byte sectors. This is the default. -complete generate MediaKit's comprehensive report, with end offsets, significant free space, etc. -diagnostic generate MediaKit's diagnostic report, which shows all partition schemes encountered. Useful for Boot Camp troubleshooting. -endoffsets indicate last block of each partition. -nofreespace suppress all free space reporting. Not valid with -shims. -shims report free space < 32 sectors. -uuids show per-instance UUIDs for each partition. APM does not store instance UUIDs so these will be randomly generated for APM maps. udifrez [options] image (deprecated) embed resources in a disk image. You must specify one of the following options: -xml file Copy resources from the XML in file. -replaceall Delete all pre-existing resources in image. udifderez [options] image (deprecated) extract resources from image. Options: -xml emit XML output (default) -rez emit Rez format output Common options: -encryption, -stdinpass, and -srcimagekey.
|
hdiutil – manipulate disk images (attach, verify, create, etc)
|
hdiutil verb [options]
| null |
Verifying: hdiutil verify myimage.img verifies an image against its internal checksum. Converting: hdiutil convert master.dmg -format UDTO -o master converts master.dmg to a CD-R export image named master.cdr hdiutil convert /dev/disk1 -format UDRW -o devimage converts the disk /dev/disk1 to a read/write device image file. authopen(1) will be used if read access to /dev/rdisk1 is not available. Note use of the block-special device. hdiutil convert image.dmg -o image.sparsebundle converts image.dmg to format UDSB by automatically detecting the file extension .sparsebundle. hdiutil convert files.sparsebundle -format UDZO \ -imagekey zlib-level=5 -o files converts files.sparsebundle to files.dmg: a read-only, compressed disk image using zlib level 5 instead of the default. hdiutil convert stuff.dmg -format UDZO -encryption -o stuff-enc create a copy of stuff.dmg named stuff-enc.dmg which is encrypted with AES-128. Burning: hdiutil burn myImage.dmg burns the image to optical media and verifies the burn. hdiutil burn myRawImage.cdr -noverifyburn -noeject burns the image without verifying the burn or ejecting the disc. Volumes will be mounted after burning. Creating a 50 MB read/write encrypted image: hdiutil create -encryption -size 50m e.dmg -fs HFS+J Creating a 50 MB read/write encrypted image protected with public key only: hdiutil create -encryption -size 50m e.dmg -fs HFS+J \ -pubkey F534A3B0C2AEE3B988308CC89AA04ABE7FDB5F30 Creating a 50 MB read/write encrypted image protected with public key and password: hdiutil create -encryption -size 50m e.dmg -fs HFS+J -agentpass \ -pubkey F534A3B0C2AEE3B988308CC89AA04ABE7FDB5F30 Note that these two -pubkey usage examples assume a certificate corresponding to this public key is currently in the user's keychain or smart card. For additional information on smart card authorization setup see sc_auth(8). Creating an encrypted single-partition image without user interaction: printf pp|hdiutil create -encryption -stdinpass -size 9m sp.dmg Creating a "1 GB" SPARSE image (a 1 GB filesystem in a growable file): hdiutil create -type SPARSE -size 1g -fs HFS+J growableTo1g Creating a "1 GB" SPARSEBUNDLE (a 1 GB filesystem in a growable bundle): hdiutil create -type SPARSEBUNDLE -size 1g -fs HFS+J growableTo1g Creating a new mounted volume backed by an image: hdiutil create -volname Dick -size 1.3m -fs HFS+ -attach Moby.dmg Attaching an image on a web server to the system, with any writes going to a local file: hdiutil attach https://my.webserver.com/master.dmg \ -shadow /tmp/mastershadowfile Using a shadow file to attach a read-only image read/write to modify it, then convert it back to a read-only image. This method eliminates the time/space required to convert a image to read/write before modifying it. hdiutil attach -owners on Moby.dmg -shadow /dev/disk2 Apple_partition_scheme /dev/disk2s1 Apple_partition_map /dev/disk2s2 Apple_HFS /Volumes/Dick ditto /Applications/Preview.app /Volumes/Dick hdiutil detach /dev/disk2 hdiutil convert -format UDZO Moby.dmg -shadow Creating a RAM-backed device and filesystem: NUMSECTORS=128000 # a sector is 512 bytes mydev=`hdiutil attach -nomount ram://$NUMSECTORS` newfs_hfs $mydev mkdir /tmp/mymount mount -t hfs $mydev /tmp/mymount Using makehybrid to create cross-platform data with files overlapping between filesystem views, containing these files: albumlist.txt song2.wma song4.m4a song6.mp3 song8.mp3 song1.wma song3.m4a song5.mp3 song7.mp3 hdiutil makehybrid -o MusicBackup.iso Music -hfs -iso -joliet \ -hide-hfs 'Music/*.wma' -hide-joliet 'Music/{*.m4a,*.mp3}' \ -hide-iso 'Music/*.{wma,m4a}' will create an image with three filesystems pointing to the same blocks. The HFS+ filesystem, typically only visible on Macintosh systems, will not include the .wma files, but will show the .m4a and .mp3 files. The Joliet filesystem will not show the .m4a and .mp3 files, but will show the .wma files. The ISO9660 filesystem, typically the default filesystem for optical media on many platforms, will only show the .mp3 files. All three filesystems will include the "albumlist.txt" files. Image from directory: hdiutil create -srcfolder mydir mydir.dmg This method uses the least disk space during image creation, but the resulting image may be slightly less space efficient. Image from directory using an intermediate sparse bundle: hdiutil create -srcfolder mydir -format UDSB mydir.sparsebundle hdiutil convert mydir.sparsebundle -format UDZO -o mydir.dmg This method produces space-optimal images, but requires much more disk space during image creation. The intermediate sparse bundle image can be removed after the process is complete. Manually changing ownership settings of a read-only disk image: hdiutil attach myimage.dmg ... /dev/disk1s2 Apple_HFS /Volumes/myVolume diskutil unmount disk1s2 mkdir /Volumes/myVolume sudo mount -r -t hfs -o owners /dev/disk1s2 /Volumes/myVolume # -o owners is the default for manual mounts Forcing a known image to attach: hdiutil attach -imagekey diskimage-class=CRawDiskImage myBlob.bar ENVIRONMENT The following environment variables affect hdiutil and DiskImages: com_apple_hdid_verbose enable -verbose behavior for attach. com_apple_hdid_debug enable -debug behavior for attach. com_apple_hdid_nokernel similar to -nokernel but works even with, for example, create -attach. com_apple_hdid_kernel Make attach behave as if -kernel was passed. In Mac OS X 10.4.x, in-kernel was the default behavior for UDRW and SPARSE images. In Mac OS X 10.5 and later, these and other kernel- compatible images again default to attaching with a user process. If an image is not "kernel-compatible" and in-kernel mounting is specified, the attach will fail. WARNING: ram:// images use wired memory when attached in-kernel. com_apple_diskimages_insecureHTTP disable SSL peer verification the same way -insecurehttp does. Useful for clients of DiskImages such as asr(8) which don't support a similar command line option. ERRORS DiskImages uses many frameworks and can encounter many error codes. In general, it tries to turn these error numbers into localized strings for the user. For background, intro(2) is a good explanation of our primary error domain: the BSD errno values. For debugging, -verbose should generally provide enough information to figure out what has gone wrong. The following is a list of interesting errors that hdiutil may encounter: No mountable filesystems The "No mountable filesystems" error from hdiutil attach means that no filesystems could be recognized or mounted after the disk image was attached. The default behavior in this case is to detach the disk image. See attach for options modifying this behavior. This error can occur if the disk image or contained filesystem is corrupt. It can also occur if an image was created from a block device containing a mounted, journaled filesystem (in which case the image contains a dirty journal that can't be replayed without making the image read/write, such as with attach -shadow). [ENXIO] Device not configured. This error is returned explicitly by DiskImages when its kernel driver or framework helper cannot be contacted. It also often shows up when a device has been removed while I/O is still active. One common case of the helper not being found is when Foundation's Distributed Objects RPC mechanism cannot be configured. D.O. doesn't work under dead Mach bootstrap contexts such as can exist in a reattached screen(1) session. Root users can take advantage of StartupItemContext(8) (in /usr/libexec) to access the startup item Mach bootstrap context. [EINVAL] Invalid argument. This error is used in many contexts and is often a clue that hdiutil's arguments are subtly non-sensical (e.g. an invalid layout name passed to create -layout). [EFBIG] File too large. DiskImages reports this error when attempting to access a disk image over HTTP that is too large for the server to support access via Range requests. Segmented images can sometimes be used to work around this limitation of older HTTP servers. This error can also occur if an overflow occurs with an old-style UDIF resource fork. [EAUTH] Authentication error. Used by DiskImages when libcurl(3) is unable to verify its SSL peer or when Security.framework indicates that the user failed to enter the correct password. See -insecurehttp and -cacert for more information about verification of SSL peers. [EBUSY] Resource busy. Used if necessary exclusive access cannot be obtained. This error often appears when a volume can't be unmounted. lsof(8) may help determine which open files could be causing the error. [EAGAIN] Resource temporarily unavailable. As of Mac OS X 10.5, DiskImages uses read/write locks on its image files to prevent images from being attached on more than one machine at a time (e.g. over the network). EAGAIN is returned if the appropriate read or write lock can't be obtained. EACCES vs. EPERM EACCES and EPERM are subtly different. The latter "operation not permitted" tends to refer to an operation that cannot be performed, often due to an incorrect effective user ID. On the other hand, "permission denied" tends to mean that a particular file access mode prevented the operation. USING PERSISTENT SPARSE IMAGES As of Mac OS X 10.5, a more reliable, efficient, and scalable sparse format, UDSB (SPARSEBUNDLE), is recommended for persistent sparse images as long as a backing bundle (directory) is acceptable. Mac OS X 10.5 also introduced F_FULLFSYNC over AFP (on client and server), allowing proper journal flushes for HFS+J-bearing images. Critical data should never be stored in sparse disk images on file servers that don't support F_FULLFSYNC. SPARSE (UDSP) images and shadow files were designed for intermediate use when creating other images (e.g. UDZO) when final image sizes are unknown. Generally speaking, SPARSE images are not recommended for persistent storage, though they are relatively safe on Mac OS X 10.3.2 and later. On versions earlier than 10.3.2, SPARSE should be avoided in favor of UDRW images and resize. On Mac OS X 10.5 and later, the more robust and faster SPARSEBUNDLE type is preferred. Note that both sparse formats, UDSP and UDSB, are growable only up to a limit: the size parameter specified when they were created. They will take up less space on the hosting filesystem if they contain less data than their created size, and grow up to that size as data is added. If more space is needed than is referenced by the hosted filesystem, hdiutil resize or diskutil(8) resize can help to grow or shrink the filesystem in an image. compact reclaims unused space in sparse images. Though they request that hosted HFS+ filesystems use a special "front first" allocation policy, beware that sparse images can enhance the effects of any fragmentation in the hosted filesystem. To prevent errors when a filesystem inside of a sparse image has more free space than the volume holding the sparse image, HFS+ volumes inside sparse images will report an amount of free space slightly less than the amount of free space on the volume on which image resides. The image filesystem currently only behaves this way as a result of a direct attach action and will not behave this way if, for example, the filesystem is unmounted and remounted. Moving the image file to a different volume with sufficient free space will allow the image's filesystem to grow to its full size. DEVICE SPECIAL FILES Since any /dev entry can be treated as a raw disk image, it is worth noting which devices can be accessed when and how. /dev/rdisk nodes are character-special devices, but are "raw" in the BSD sense and force block-aligned I/O. They are closer to the physical disk than the buffer cache. /dev/disk nodes, on the other hand, are buffered block-special devices and are used primarily by the kernel's filesystem code. It is not possible to read from a /dev/disk node while a filesystem is mounted from it, but anyone with read access to the appropriate /dev/rdisk node can use hdiutil verbs such as fsid or pmap with it. Beware that information read from a raw device while a filesystem is mounted may not be consistent because the consistent data is stored in memory or in the filesystem's journal. The DiskImages framework will attempt to use authopen(1) to open any device which it can't open (due to EACCES) for reading with open(2). Depending on session characteristics, this behavior can cause apparent hangs while trying to access /dev entries while logged in remotely (an authorization panel is waiting on console). Generally, the /dev/disk node is preferred for imaging devices (e.g. convert or create -srcdevice operations), while /dev/rdisk is usable for the quick pmap or fsid. In particular, converting the blocks of a mounted journaled filesystem to a read-only image will prevent the volume in the image from mounting (the journal will be permanently dirty). PERMISSIONS VS. OWNERS Some filesystems support permissions including users and groups. While important for security on a managed filesystem, users and groups ("owners") pose challenges for unmanaged, shared filesystems such as those typically present in disk images. macOS's solution to this problem is to make owners optional, both while creating files and enforcing permissions. By default, unknown HFS+ filesystems on "external" devices (including disk images) mount with their owners ignored (mount -o noowners). Normally when owners are ignored, the system uses a special _unknown user and group to dynamically substitute the current user's identity for any owners recorded in the filesystem. These _unknown owners are even written to the volume when creating new files. The new files will continue to have "floating" ownership when mounted with owners honored. The net result is that shared volumes behave as expected regardless of how they are accessed. The behavior is different when disk images are attached. With disk images, the owner of all files in a filesystem mount for which owners are ignored is the user attaching the disk image. The attaching owner is also used when creating new files. On modern macOS systems, root (UID 0) can "see through" the "owners ignored" user mappings. Thus sudo ls -l /Volumes/imageVol will show whatever is really stored in the filesystem (possibly _unknown) regardless of whether owners are currently being honored on that volume. In contrast, non-root users will see themselves any time _unknown is in effect, whether the default for the mount when owners are ignored or because _unknown is stored on disk. For disk images, non-root users will see owners matching the user that attached the disk image. Unlike owners, permissions are never optional. A non-writable file will not be writable just because owners are ignored. However, a file that is writable by its owner will be writable by everyone if _unknown is the effective owner of the file for that file. Because anyone accessing an owners-ignored file is treated as the owner, everyone is effectively the owner. Because the default behavior for disk image filesystems is for all files to be owned by the user attaching the disk image, other users will be treated per the 'group' (if applicable) and 'other' permission modes. diskutil(8)'s enableOwnership or the Finder's Get Info window can be used to configure a system to respect the on-disk owners for a filesystem in the future. COMPATIBILITY The DiskImages framework supports a variety of image formats, including read/write, read-only, and read-only compressed (which are decompressed in small chunks as I/O requests are made). It is capable of mounting most images directly from http:// URLs. Because DiskImages can make many requests over a single connection, responsiveness can be improved by modifying HTTP server settings such as apache's MaxKeepAliveRequests and KeepAliveTimeout. Mac OS X 10.0 supported the disk images of Disk Copy 6 on Mac OS 9. OS X 10.1 added sparse, encrypted, and zlib-compressed images. These images will not be recognized on Mac OS X 10.0 (or will attach read/write, possibly allowing for their destruction). As the sparse, shadow, and encrypted formats have evolved, switches have been added to facilitate the creation of images that are compatible with older OS versions (at the expense of the performance and reliability improvements offered by the format enhancements). In particular, sparse images should not be expected to attach on versions of OS X older than that which created them. With Mac OS X 10.2, the most common image formats went "in-kernel" (i.e. the DiskImages kernel extension served them without a helper process), image meta-data began being stored both as XML and in the embedded resource fork, and the default Disk Copy.app "compressed" format became UDZO (breaking compatibility with 10.0). Mac OS X 10.4 introduced bzip2 compression in the UDBZ format which provides smaller images (especially when combined with makehybrid) at the expense of backwards compatibility, some performance, and kernel compatibility. In Mac OS X 10.4.7, the resource forks previously embedded in UDIF images were abandoned entirely to avoid metadata length limitations imposed by resource fork structures. As a result, UDIF images created on 10.4.7 and later will not, by default, be recognized by either Mac OS X 10.1 or Mac OS X 10.0. flatten can be used to customize the type of metadata stored in the image. Mac OS X 10.5 introduced sparse bundle images which compact quickly but are not recognized by previous OS versions. Mac OS X 10.6 removed support for attaching SPARSEBUNDLE images from network file servers that don't support F_FULLFSYNC, although this requirement was relaxed in macOS 10.12. OS X 10.7 removed double-click support for images using legacy metadata; these can be rehabilitated using flatten and unflatten, or simply convert. OS X 10.11 introduced lzfse compression in the ULFO format, providing faster, more efficient compression and smaller images compared to UDZO. These images are also supported in-kernel, but will not work on any earlier versions of the OS. macOS 10.12 included a pre-release version of the Apple File System called APFS which was meant for evaluation and development purposes only. Files stored in APFS-based images may not be accessible in future releases of macOS, and won't work in past ones. All data to be stored in APFS volumes should be backed up prior to using APFS and regularly backed up while using APFS. macOS 10.15: • Introduced lzma compression in the ULMO format, providing smaller images compared to ULFO. These images are not supported in-kernel, and will not work on any earlier versions of the OS. • Deprecated OS 9-style dual-fork file support (hdiutil flatten/unflatten). • Removed the deprecated "hdiutil internet-enable" command and the IDME attach flags. macOS 11.0: • Removed support for DiskCopy42, DART and NDIF formats. • Removed support for AppleSingle and MacBinary encodings. • Removed the deprecated OS 9-style dual-fork file support (hdiutil flatten/unflatten). • Default file system for new images has changed to APFS (instead of an empty disk image with no partition map). To create an empty disk image add "-layout NONE" to the creation flags. This change does not apply to images created with -srcfolder or -srcdevice arguments. macOS 12.0: • Deprecated UDBZ format (bzip2 compression). • Deprecated segmented UDIF images (hdiutil segment, -segmentSize argument in hdiutil create & convert). • Deprecated hdiutil udifrez/udifderez (embed and extract resources). macOS 13.0: • Removed the option "encrypted-encoding-version". All new encrypted images are created with encrypted encoding version 2. HISTORY Disk images were first invented to electronically store and transmit representations of floppy disks for manufacturing replication. These images of floppies are typically referred to as 'Disk Copy 4.2' images, in reference to the application that created and restored them to floppy disks. Disk Copy 4.2 images were block-for-block representations of a floppy disk, with no notion of compression. DART is a variant of the Disk Copy 4.2 format that supported compression. NDIF (New Disk Image Format) images were developed to replace the Disk Copy 4.2 and DART image formats and to support images larger than a floppy disk. With NDIF and Disk Copy version 6, images could be "attached" as mass storage devices under Mac OS 9. Apple Data Compression (ADC) -- which carefully optimizes for fast decompression -- was used to compress images that were typically created once and restored many times during manufacturing. UDIF (Universal Disk Image Format) device images picked up where NDIF left off, allowing images to represent entire block devices and all the data therein: DDM, partition map, disk-based drivers, etc. For example, it can represent bootable CDs which can then be replicated from an image. To ensure single-fork files (NDIF was dual-fork), it began embedding its resource fork in the data fork. UDIF is the native image format for OS X. Raw disk images from other operating systems (e.g. .iso files) will be recognized as disk images and can be attached and mounted if macOS recognizes the filesystems. They can also be burned with hdiutil burn. WHAT'S NEW macOS 10.15 added ULMO format images compressed with lzma. These images are smaller than comparable ULFO images compressed with lzfse. These images are not supported in-kernel, and are not usable on earlier OSes. macOS 10.12 introduced the pre-release APFS for evaluation (see COMPATIBILITY above). 10.12 also added an option to disable atomic copying during image from folder operations, -noatomic, which may result in slightly faster image creation. pmap added a new switch, -diagnostic, which captures troubleshooting information for Boot Camp configurations. OS X 10.11 added ULFO format images compressed with lzfse. These images are more efficient and smaller than comparable UDZO images compressed with zlib, and retain kernel compatibility, but are not usable on earlier OSes. OS X 10.10 quadrupled the default UDIF chunk size without affecting backward compatibility. UDIF images created or converted on 10.10 will benefit from smaller metadata and more efficient compression for UDZO and especially UDBZ formats. OS X 10.7 added the ability to quickly render encrypted images inaccessible using the new erasekeys verb, which saves time versus securely overwriting the entire image. In Mac OS X 10.6, pmap was rewritten to use MediaKit's latest reporting routines so that it can properly support GPT partition maps. Also -debug now implies -verbose for all verbs. Mac OS X 10.5 changed the behavior of attach when run on an existing image or /dev node: if the image was attached but no volume was mounted, the volume would be mounted. Prior systems would return the /dev without mounting the volume. This change effectively removes the ability to create a second /dev node from an existing one. SEE ALSO diskutil(8), asr(8), ioreg(8), hfs.util(8), apfs.util(8), msdos.util(8), exfat.util(8), authopen(1), ditto(8), drutil(1), diskarbitrationd(8). macOS 09 Dec 2020 macOS
|
top
|
The top program periodically displays a sorted list of system processes. The default sorting key is pid, but other keys can be used instead. Various output options are available.
|
top – display sorted information about processes
|
top [-a | -d | -e | -c mode] [-F | -f] [-h] [-i interval] [-l samples] [-ncols columns] [-o key | -O skey] [-R | -r] [-S] [-s delay-secs] [-n nprocs] [-stats keys] [-pid processid] [-user username] [-U username] [-u]
|
Command line option specifications are processed from left to right. Options can be specified more than once. If conflicting options are specified, later specifications override earlier ones. This makes it viable to create a shell alias for top with preferred defaults specified, then override those preferred defaults as desired on the command line. -a Equivalent to -c a. -c mode Set event counting mode to mode. The supported modes are a Accumulative mode. Count events cumulatively, starting at the launch of top. Calculate CPU usage and CPU time since the launch of top. d Delta mode. Count events relative to the previous sample. Calculate CPU usage since the previous sample. This mode by default disables the memory object map reporting. The memory object map reporting may be re- enabled with the -r option or the interactive r command. e Absolute mode. Count events using absolute counters. n Non-event mode (default). Calculate CPU usage since the previous sample. -d Equivalent to -c d. -e Equivalent to -c e. -F Do not calculate statistics on shared libraries, also known as frameworks. -f Calculate statistics on shared libraries, also known as frameworks (default). -h Print command line usage information and exit. -i interval Update framework (-f) info every interval samples; see the PERFORMANCE/ACCURACY TRADEOFF section for more details. -l samples Use logging mode and display samples samples, even if standard output is a terminal. 0 is treated as infinity. Rather than redisplaying, output is periodically printed in raw form. Note that the first sample displayed will have an invalid %CPU displayed for each process, as it is calculated using the delta between samples. -ncols columns Display columns when using logging mode. The default is infinite. The number must be > 0 or an error will occur. -n nprocs Only display up to nprocs processes. -O skey Use skey as a secondary key when ordering the process display. See -o for key names (pid is the default). -o key Order the process display by sorting on key in descending order. A + or - can be prefixed to the key name to specify ascending or descending order, respectively. The supported keys are: pid Process ID command Command name. cpu CPU usage. (default). cpu_me CPU time charged to me by other processes. cpu_others CPU time charged to other processes by me. csw The number of context switches. time Execution time. threads alias: th Number of threads (total/running). ports alias: prt Number of Mach ports. mregion alias: mreg, reg Number of memory regions. mem Physical memory footprint of the process. rprvt Resident private address space size. purg Purgeable memory size. vsize Total memory size. vprvt Private address space size. kprvt Private kernel memory size. kshrd Shared kernel memory size. pgrp Process group ID. ppid Parent process ID. state alias: pstate Process state. One of "zombie", "running", "stuck" (i.e. uninterruptible sleep), "sleeping", "idle", "stopped", "halted", or "unknown". uid User ID. wq alias: #wq, workqueue The workqueue total/running. faults alias: fault The number of page faults. cow alias: cow_faults The copy-on-write faults. user alias: username Username. msgsent Total number of Mach messages sent. msgrecv Total number of Mach messages received. sysbsd Total BSD syscalls. sysmach Total Mach syscalls. pageins Total pageins. boosts The number of boosts held by the process. This is followed by the number of times the process has transitioned from unboosted to boosted in brackets. An asterisk before the value indicates that the process was able to send boosts at some point since the previous update. For more information about boosts, see xpc_transaction_begin(3). instrs The number of instructions retired by the process in both user space and the kernel. cycles The number of cycles spent executing instructions in the process in both user space and the kernel. jetpri Jetsam priority of the process. -R Do not traverse and report the memory object map for each process (default). -r Traverse and report the memory object map for each process. -S Display the global statistics for swap and purgeable memory. -s delay-secs Set the delay between updates to delay-secs seconds. The default delay between updates is 1 second. -stats keys Only display the comma separated statistics. See the -o flag for the valid keys. -pid processid Only display processid in top. This option may be specified multiple times. -user user Only display processes owned by user -U user This is an alias for -user. -u This is an alias equivalent to: -o cpu -O time DISPLAY The first several lines of the top display show various global state. All of the information is labeled. Following is an alphabetical list of global state fields and their descriptions. CPU Percentage of processor usage, broken into user, system, and idle components. The time period for which these percentages are calculated depends on the event counting mode. Disks Number and total size of disk reads and writes. LoadAvg Load average over 1, 5, and 15 minutes. The load average is the average number of jobs in the run queue. MemRegions Number and total size of memory regions, and total size of memory regions broken into private (broken into non-library and library) and shared components. Networks Number and total size of input and output network packets. PhysMem Physical memory usage, broken into wired, active, inactive, used, and free components. Procs Total number of processes and number of processes in each process state. SharedLibs Resident sizes of code and data segments, and link editor memory usage. Threads Number of threads. Time Time, in H:MM:SS format. When running in logging mode, Time is in YYYY/MM/DD HH:MM:SS format by default, but may be overridden with accumulative mode. When running in accumulative event counting mode, the Time is in HH:MM:SS since the beginning of the top process. VirtMem Total virtual memory, virtual memory consumed by shared libraries, and number of pageins and pageouts. Swap Swap usage: total size of swap areas, amount of swap space in use and amount of swap space available. Purgeable Number of pages purged and number of pages currently purgeable. Below the global state fields, a list of processes is displayed. The fields that are displayed depend on the options that are set. The pid field displays the following for the architecture: + for 64-bit native architecture, or - for 32-bit native architecture, or * for a non-native architecture. INTERACTION When top is run in interactive (non-logging) mode, it is possible to control the output of top, as well as interactively send signals to processes. The interactive command syntax is terse. Each command is one character, followed by 0 to 2 arguments. Commands that take arguments prompt interactively for the arguments, and where applicable, the default value is shown in square brackets. The default value can be selected by leaving the input field blank and pressing enter. ^G escapes the interactive argument prompt, and has the same effect as leaving the input field blank and pressing enter. The following commands are supported: ? Display the help screen. Any character exits help screen mode. This command always works, even in the middle of a command. ^L Redraw the screen. cmode Set output mode to mode. See the -c option for descriptions of the allowed modes. Oskey Use skey as a secondary key when ordering the process display. See the -o option for key names. okey Order the process display by sorting on key in descending order. A + or - can be prefixed to the key name to specify ascending or descending order, respectively. The supported keys and alises are listed with the -o option above. q Quit. r Toggle traversal and reporting of the memory object map for each process. Ssignalpid Send signal signal to pid. signal can be specified either as a number or as a name (for example, HUP). The default signal starts out as TERM. Each time a signal is successfully sent, the default signal is updated to be that signal. pid is a process id. s delay-secs Set the delay between updates to delay-secs seconds. U user Only display processes owned by user. Either the username or uid number can be specified. To display all processes, press enter without entering a username or uid number. PERFORMANCE/ACCURACY TRADEOFF Calculating detailed memory statistics is fundamentally resource- intensive. To reduce the CPU usage in top, the -i option has been introduced to allow the user to tune this tradeoff. With the default value of 10, framework stats will be updated once every 10 samples. Specifying -i 1 will result in the most accurate display, at the expense of system resources. NOT AVAILABLE When N/A occurs in a stat, it's caused by the memory object map reporting being disabled. Memory object map reporting is disabled by default in delta mode, but may be optionally enabled via -r or the interactive r command. To enable the -r option, use it after any -c mode options.
|
top -o cpu -O +rsize -s 5 -n 20 Sort the processes according to CPU usage (descending) and resident memory size (ascending), sample and update the display at 5 second intervals, and limit the display to 20 processes. top -c d Run top in delta mode. top -stats pid,command,cpu,th,pstate,time Display only the specified statistics, regardless of any growth of the terminal. If the terminal is too small, only the statistics that fit will be displayed. SEE ALSO taskinfo(1), vm_stat(1), vmmap(1), kill(2), signal(3) Darwin February 10, 2020 Darwin
|
gktool
| null | null | null | null | null |
javah
| null | null | null | null | null |
tee
|
The tee utility copies standard input to standard output, making a copy in zero or more files. The output is unbuffered. The following options are available: -a Append the output to the files rather than overwriting them. -i Ignore the SIGINT signal. The following operands are available: file A pathname of an output file. The tee utility takes the default action for all signals, except in the event of the -i option. EXIT STATUS The tee utility exits 0 on success, and >0 if an error occurs.
|
tee – duplicate standard input
|
tee [-ai] [file ...]
| null |
Send the echoed message both to stdout and to the greetings.txt file: $ echo "Hello" | tee greetings.txt Hello STANDARDS The tee utility is expected to be IEEE Std 1003.2 (“POSIX.2”) compatible. macOS 14.5 June 23, 2020 macOS 14.5
|
tidy_changelog
|
Takes a changelog file, parse it using CPAN::Changes and prints out the resulting output. If a file is not given, the program will see if there is one file in the current directory beginning by 'change' (case- insensitive) and, if so, assume it to be the changelog. ARGUMENTS --next If provided, assumes that there is a placeholder header for an upcoming next release. The placeholder token is given via --token. --token Regular expression to use to detect the token for an upcoming release if --next is used. If not explicitly given, defaults to "\{\{\$NEXT\}\}". --headers If given, only print out the release header lines, without any of the changes. --reverse Prints the releases in reverse order (from the oldest to latest). --check Only check if the changelog is formatted properly using the changes_file_ok function of Test::CPAN::Changes. --help This help perl v5.34.0 2014-10-10 TIDY_CHANGELOG(1)
|
tidy_changelog - command-line tool for CPAN::Changes
|
$ tidy_changelog Changelog
| null | null |
xip
|
The xip tool is used to create a digitally signed archive. As of macOS Sierra, only archives that are signed by Apple are trusted, and the format is deprecated for third party use. ARGUMENTS AND OPTIONS --sign identity-name The name of the identity to use for signing the archive. --keychain keychain-path Specify a specific keychain to search for the signing identity. --timestamp Include a trusted timestamp with the signature. --timestamp=none Disable trusted timestamp, regardless of identity. input-file ... The path to one or more files or directories to be archived. output-archive The path to which the signed archive will be written. --expand <input-file> Expands the archive into the current working directory. This option cannot be used with any other arguments. macOS September 23, 2011 macOS
|
xip – Create or expand a secure archive for secure distribution.
|
xip [options] --sign identity input-file ... output-archive
| null | null |
yapp
|
yapp is a frontend to the Parse::Yapp module, which lets you compile Parse::Yapp grammar input files into Perl LALR(1) OO parser modules.
|
yapp - A perl frontend to the Parse::Yapp module SYNOPSYS yapp [options] grammar[.yp] yapp -V yapp -h
| null |
Options, as of today, are all optionals :-) -v Creates a file grammar.output describing your parser. It will show you a summary of conflicts, rules, the DFA (Deterministic Finite Automaton) states and overall usage of the parser. -s Create a standalone module in which the driver is included. Note that if you have more than one parser module called from a program, to have it standalone, you need this option only for one of your parser module. -n Disable source file line numbering embedded in your parser module. I don't know why one should need it, but it's there. -m module Gives your parser module the package name (or name space or module name or class name or whatever-you-call-it) of module. It defaults to grammar -o outfile The compiled output file will be named outfile for your parser module. It defaults to grammar.pm or, if you specified the option -m A::Module::Name (see below), to Name.pm, in the current working directory. -t filename The -t filename option allows you to specify a file which should be used as template for generating the parser output. The default is to use the internal template defined in Parse::Yapp::Output.pm. For how to write your own template and which substitutions are available, have a look to the module Parse::Yapp::Output.pm : it should be obvious. -b shebang If you work on systems that understand so called shebangs, and your generated parser is directly an executable script, you can specifie one with the -b option, ie: yapp -b '/usr/local/bin/perl -w' -o myscript.pl myscript.yp This will output a file called myscript.pl whose very first line is: #!/usr/local/bin/perl -w The argument is mandatory, but if you specify an empty string, the value of $Config{perlpath} will be used instead. grammar The input grammar file. If no suffix is given, and the file does not exists, an attempt to open the file with a suffix of .yp is tried before exiting. -V Display current version of Parse::Yapp and gracefully exits. -h Display the usage screen. BUGS None known now :-) AUTHOR William N. Braswell, Jr. <wbraswell_cpan@NOSPAM.nym.hush.com> (Remove "NOSPAM".) COPYRIGHT Copyright © 1998, 1999, 2000, 2001, Francois Desarmenien. Copyright © 2017 William N. Braswell, Jr. See Parse::Yapp(3) for legal use and distribution rights SEE ALSO Parse::Yapp(3) Perl(1) yacc(1) bison(1) perl v5.34.0 2017-08-04 YAPP(1)
| null |
wsimport
| null | null | null | null | null |
bzfgrep
|
Bzgrep is used to invoke the grep on bzip2-compressed files. All options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If bzgrep is invoked as bzegrep or bzfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, bzgrep uses it as the grep program to be invoked. For example: for sh: GREP=fgrep bzgrep string files for csh: (setenv GREP fgrep; bzgrep string files) AUTHOR Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. SEE ALSO grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1) BZGREP(1)
|
bzgrep, bzfgrep, bzegrep - search possibly bzip2 compressed files for a regular expression
|
bzgrep [ grep_options ] [ -e ] pattern filename... bzegrep [ egrep_options ] [ -e ] pattern filename... bzfgrep [ fgrep_options ] [ -e ] pattern filename...
| null | null |
qlmanage
|
qlmanage allows you to test your Quick Look generators and manage Quick Look Server. The following usages are available: 1. qlmanage -r resets Quick Look Server and all Quick Look client's generator cache. 2. qlmanage -m gets all sort of information on Quick Look server including the list of detected generators. 3. qlmanage -t displays the Quick Look generated thumbnails (if available) for the specified files. 4. qlmanage -p displays the Quick Look generated previews for the specified files. 5. qlmanage -h displays extensive help. Mac OS X March 29, 2007 Mac OS X
|
qlmanage – Quick Look Server debug and management tool
|
qlmanage -r qlmanage -m [name ...] qlmanage -t [-x] [-i] [-s size] [-f factor] [-c contentTypeUTI [-g generator]] [file ...] qlmanage -p [-x] [-c contentTypeUTI [-g generator]] [file ...] qlmanage -h
| null | null |
snmptranslate
|
snmptranslate is an application that translates one or more SNMP object identifier values from their symbolic (textual) forms into their numerical forms (or vice versa). OID is either a numeric or textual object identifier.
|
snmptranslate - translate MIB OID names between numeric and textual forms
|
snmptranslate [OPTIONS] OID [OID]...
|
-D[TOKEN[,...]] Turn on debugging output for the given TOKEN(s). Try ALL for extremely verbose output. -h Display a brief usage message and then exit. -m MIBLIST Specifies a colon separated list of MIB modules to load for this application. This overrides the environment variable MIBS. The special keyword ALL is used to specify all modules in all directories when searching for MIB files. Every file whose name does not begin with "." will be parsed as if it were a MIB file. -M DIRLIST Specifies a colon separated list of directories to search for MIBs. This overrides the environment variable MIBDIRS. -T TRANSOPTS Provides control over the translation of the OID values. The following TRANSOPTS are available: -Td Print full details of the specified OID. -Tp Print a graphical tree, rooted at the specified OID. -Ta Dump the loaded MIB in a trivial form. -Tl Dump a labeled form of all objects. -To Dump a numeric form of all objects. -Ts Dump a symbolic form of all objects. -Tt Dump a tree form of the loaded MIBs (mostly useful for debugging). -Tz Dump a numeric and labeled form of all objects (compatible with MIB2SCHEMA format). -V Display version information for the application and then exit. -w WIDTH Specifies the width of -Tp and -Td output. The default is very large. In addition to the above options, snmptranslate takes the OID input (-I), MIB parsing (-M) and OID output (-O) options described in the INPUT OPTIONS, MIB PARSING OPTIONS and OUTPUT OPTIONS sections of the snmpcmd(1) manual page.
|
• snmptranslate -On -IR sysDescr will translate "sysDescr" to a more qualified form: system.sysDescr • snmptranslate -Onf -IR sysDescr will translate "sysDecr" to: .iso.org.dod.internet.mgmt.mib-2.system.sysDescr • snmptranslate -Td -OS system.sysDescr will translate "sysDecr" into: SNMPv2-MIB::sysDescr sysDescr OBJECT-TYPE -- FROM SNMPv2-MIB -- TEXTUAL CONVENTION DisplayString SYNTAX OCTET STRING (0..255) DISPLAY-HINT "255a" MAX-ACCESS read-only STATUS current DESCRIPTION "A textual description of the entity. This value should include the full name and version identification of the system's hardware type, software operating-system, and networking software." ::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) system(1) 1 } • snmptranslate -Tp -OS system will print the following tree: +--system(1) | +-- -R-- String sysDescr(1) | Textual Convention: DisplayString | Size: 0..255 +-- -R-- ObjID sysObjectID(2) +-- -R-- TimeTicks sysUpTime(3) +-- -RW- String sysContact(4) | Textual Convention: DisplayString | Size: 0..255 +-- -RW- String sysName(5) | Textual Convention: DisplayString | Size: 0..255 +-- -RW- String sysLocation(6) | Textual Convention: DisplayString | Size: 0..255 +-- -R-- Integer sysServices(7) +-- -R-- TimeTicks sysORLastChange(8) | Textual Convention: TimeStamp | +--sysORTable(9) | +--sysOREntry(1) | +-- ---- Integer sysORIndex(1) +-- -R-- ObjID sysORID(2) +-- -R-- String sysORDescr(3) | Textual Convention: DisplayString | Size: 0..255 +-- -R-- TimeTicks sysORUpTime(4) Textual Convention: TimeStamp • snmptranslate -Ta | head will produce the following dump: dump DEFINITIONS ::= BEGIN org ::= { iso 3 } dod ::= { org 6 } internet ::= { dod 1 } directory ::= { internet 1 } mgmt ::= { internet 2 } experimental ::= { internet 3 } private ::= { internet 4 } security ::= { internet 5 } snmpV2 ::= { internet 6 } • snmptranslate -Tl | head will produce the following dump: .iso(1).org(3) .iso(1).org(3).dod(6) .iso(1).org(3).dod(6).internet(1) .iso(1).org(3).dod(6).internet(1).directory(1) .iso(1).org(3).dod(6).internet(1).mgmt(2) .iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1) .iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1) .iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1).sysDescr(1) .iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1).sysObjectID(2) .iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1).sysUpTime(3) • snmptranslate -To | head will produce the following dump .1.3 .1.3.6 .1.3.6.1 .1.3.6.1.1 .1.3.6.1.2 .1.3.6.1.2.1 .1.3.6.1.2.1.1 .1.3.6.1.2.1.1.1 .1.3.6.1.2.1.1.2 .1.3.6.1.2.1.1.3 • snmptranslate -Ts | head will produce the following dump .iso.org .iso.org.dod .iso.org.dod.internet .iso.org.dod.internet.directory .iso.org.dod.internet.mgmt .iso.org.dod.internet.mgmt.mib-2 .iso.org.dod.internet.mgmt.mib-2.system .iso.org.dod.internet.mgmt.mib-2.system.sysDescr .iso.org.dod.internet.mgmt.mib-2.system.sysObjectID .iso.org.dod.internet.mgmt.mib-2.system.sysUpTime • snmptranslate -Tt | head will produce the following dump org(3) type=0 dod(6) type=0 internet(1) type=0 directory(1) type=0 mgmt(2) type=0 mib-2(1) type=0 system(1) type=0 sysDescr(1) type=2 tc=4 hint=255a sysObjectID(2) type=1 sysUpTime(3) type=8 SEE ALSO snmpcmd(1), variables(5), RFC 2578-2580. V5.6.2.1 20 Jul 2010 SNMPTRANSLATE(1)
|
split
|
The split utility reads the given file and breaks it up into files of 1000 lines each (if no options are specified), leaving the file unchanged. If file is a single dash (‘-’) or absent, split reads from the standard input. The options are as follows: -a suffix_length Use suffix_length letters to form the suffix of the file name. -b byte_count[K|k|M|m|G|g] Create split files byte_count bytes in length. If k or K is appended to the number, the file is split into byte_count kilobyte pieces. If m or M is appended to the number, the file is split into byte_count megabyte pieces. If g or G is appended to the number, the file is split into byte_count gigabyte pieces. -d Use a numeric suffix instead of a alphabetic suffix. -l line_count Create split files line_count lines in length. -n chunk_count Split file into chunk_count smaller files. The first n - 1 files will be of size (size of file / chunk_count ) and the last file will contain the remaining bytes. -p pattern The file is split whenever an input line matches pattern, which is interpreted as an extended regular expression. The matching line will be the first line of the next output file. This option is incompatible with the -b and -l options. If additional arguments are specified, the first is used as the name of the input file which is to be split. If a second additional argument is specified, it is used as a prefix for the names of the files into which the file is split. In this case, each file into which the file is split is named by the prefix followed by a lexically ordered suffix using suffix_length characters in the range “a-z”. If -a is not specified, two letters are used as the suffix. If the prefix argument is not specified, the file is split into lexically ordered files named with the prefix “x” and with suffixes as above. ENVIRONMENT The LANG, LC_ALL, LC_CTYPE and LC_COLLATE environment variables affect the execution of split as described in environ(7). EXIT STATUS The split utility exits 0 on success, and >0 if an error occurs.
|
split – split a file into pieces
|
split -d [-l line_count] [-a suffix_length] [file [prefix]] split -d -b byte_count[K|k|M|m|G|g] [-a suffix_length] [file [prefix]] split -d -n chunk_count [-a suffix_length] [file [prefix]] split -d -p pattern [-a suffix_length] [file [prefix]]
| null |
Split input into as many files as needed, so that each file contains at most 2 lines: $ echo -e "first line\nsecond line\nthird line\nforth line" | split -l2 Split input in chunks of 10 bytes using numeric prefixes for file names. This generates two files of 10 bytes (x00 and x01) and a third file (x02) with the remaining 2 bytes: $ echo -e "This is 22 bytes long" | split -d -b10 Split input generating 6 files: echo -e "This is 22 bytes long" | split -n 6 Split input creating a new file every time a line matches the regular expression for a “t” followed by either “a” or “u” thus creating two files: $ echo -e "stack\nstock\nstuck\nanother line" | split -p 't[au]' SEE ALSO csplit(1), re_format(7) STANDARDS The split utility conforms to IEEE Std 1003.1-2001 (“POSIX.1”). HISTORY A split command appeared in Version 3 AT&T UNIX. Before FreeBSD 14, pattern and line matching only operated on lines shorter than 65,536 bytes. macOS 14.5 October 25, 2022 macOS 14.5
|
chsh
|
The chpass utility allows editing of the user database information associated with user or, by default, the current user. The chpass utility cannot change the user's password on Open Directory systems. Use the passwd(1) utility instead. The chfn and chsh utilities behave identically to chpass. (There is only one program.) The information is formatted and supplied to an editor for changes. Only the information that the user is allowed to change is displayed. The options are as follows: -l location If not specified, chpass will perform a search for the user record on all available Open Directory nodes. When specified, chpass will edit the user record on the directory node at the given location. -u authname The user name to use when authenticating to the directory node containing the user. -s newshell Attempt to change the user's shell to newshell. Possible display items are as follows: Login: user's login name Uid: user's login Gid: user's login group Generated uid: user's UUID Full Name: user's real name Office Location: user's office location Office Phone: user's office phone Home Phone: user's home phone Home Directory: user's home directory Shell: user's login shell The login field is the user name used to access the computer account. The uid field is the number associated with the login field. Both of these fields should be unique across the system (and often across a group of systems) as they control file access. While it is possible to have multiple entries with identical login names and/or identical user id's, it is usually a mistake to do so. Routines that manipulate these files will often return only one of the multiple entries, and that one by random selection. The gid field is the group that the user will be placed in at login. Since BSD supports multiple groups (see groups(1)) this field currently has little special meaning. This field may be filled in with either a number or a group name (see group(5)). The generated uid field is the globally unique identifier (UUID) for the user. The full name field contains the full name of the user. The user's home directory is the full UNIX path name where the user will be placed at login. The shell field is the command interpreter the user prefers. If the shell field is empty, the Bourne shell, /bin/sh, is assumed. When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells. The picture field is the path to a picture to be displayed for the user. OPEN DIRECTORY User database entries are under the control of DirectoryService(8) and may be physically located in many different places, including the local Directory Service node, and remote LDAP servers. This version of chpass uses Open Directory to change user database information. It does not interact with the historic flat file database /etc/master.passwd ENVIRONMENT The vi(1) editor will be used unless the environment variable EDITOR is set to an alternate editor. When the editor terminates, the information is re-read and used to update the user database itself. Only the user, or the super-user, may edit the information associated with the user. FILES /etc/chpass.XXXXXX temporary file /etc/shells the list of approved shells
|
chpass, chfn, chsh – add or change user database information
|
chpass [-l location] [-u authname] [-s newshell] [user]
| null |
Change the shell of the current user to ‘/bin/zsh’: chsh -s /bin/zsh SEE ALSO login(1), passwd(1), getusershell(3), DirectoryService(8) Robert Morris and Ken Thompson, UNIX Password security. HISTORY The chpass utility appeared in 4.3BSD-Reno. macOS 14.5 May 25, 2021 macOS 14.5
|
xml2man
| null |
xml2man – MPGL to mdoc (man page) translator
|
xml2man [-f] filename [output_filename]
|
The available options are as follows: -f Force destination file to be overwritten if it exists. filename the file to be processed output_filename the destination file ENVIRONMENT This program was designed to convert Man Page Generation Language (MPGL) XML files into mdoc-based manual pages. The MPGL is a fairly direct translation of mdoc to XML. SEE ALSO For more information on hdxml2manxml, see hdxml2manxml(1), Darwin August 28, 2002 Darwin
| null |
pl2pm5.30
|
pl2pm is a tool to aid in the conversion of Perl4-style .pl library files to Perl5-style library modules. Usually, your old .pl file will still work fine and you should only use this tool if you plan to update your library to use some of the newer Perl 5 features, such as AutoLoading. LIMITATIONS It's just a first step, but it's usually a good first step. AUTHOR Larry Wall <larry@wall.org> perl v5.30.3 2024-04-13 PL2PM(1)
|
pl2pm - Rough tool to translate Perl4 .pl files to Perl5 .pm modules.
|
pl2pm files
| null | null |
man
|
The man utility finds and displays online manual documentation pages. If mansect is provided, man restricts the search to the specific section of the manual. The sections of the manual are: 1. General Commands Manual 2. System Calls Manual 3. Library Functions Manual 4. Kernel Interfaces Manual 5. File Formats Manual 6. Games Manual 7. Miscellaneous Information Manual 8. System Manager's Manual 9. Kernel Developer's Manual Options that man understands: -M manpath Forces a specific colon separated manual path instead of the default search path. See manpath(1). Overrides the MANPATH environment variable. -P pager Use specified pager. Defaults to “less -sR” if color support is enabled, or “less -s”. Overrides the MANPAGER environment variable, which in turn overrides the PAGER environment variable. -S mansect Restricts manual sections searched to the specified colon delimited list. Defaults to “1:8:2:3:3lua:n:4:5:6:7:9:l”. Overrides the MANSECT environment variable. -a Display all manual pages instead of just the first found for each page argument. -d Print extra debugging information. Repeat for increased verbosity. Does not display the manual page. -f Emulate whatis(1). Note that only a subset of options will have any effect when man is invoked in this mode. See the below description of whatis options for details. -h Display short help message and exit. -k Emulate apropos(1). Note that only a subset of options will have any effect when man is invoked in this mode. See the below description of apropos options for details. -m arch[:machine] Override the default architecture and machine settings allowing lookup of other platform specific manual pages. This option is accepted, but not implemented, on macOS. -o Force use of non-localized manual pages. See IMPLEMENTATION NOTES for how locale specific searches work. Overrides the LC_ALL, LC_CTYPE, and LANG environment variables. -p [eprtv] Use the list of given preprocessors before running nroff(1) or troff(1). Valid preprocessors arguments: e eqn(1) p pic(1) r refer(1) t tbl(1) v vgrind(1) Overrides the MANROFFSEQ environment variable. -t Send manual page source through troff(1) allowing transformation of the manual pages to other formats. -w Display the location of the manual page instead of the contents of the manual page. Options that apropos and whatis understand: -d Same as the -d option for man. -s Same as the -S option for man. When man is operated in apropos or whatis emulation mode, only a subset of its options will be honored. Specifically, -d, -M, -P, and -S have equivalent functionality in the apropos and whatis implementation provided. The MANPATH, MANSECT, and MANPAGER environment variables will similarly be honored. IMPLEMENTATION NOTES Locale Specific Searches The man utility supports manual pages in different locales. The search behavior is dictated by the first of three environment variables with a nonempty string: LC_ALL, LC_CTYPE, or LANG. If set, man will search for locale specific manual pages using the following logic: lang_country.charset lang.charset en.charset For example, if LC_ALL is set to “ja_JP.eucJP”, man will search the following paths when considering section 1 manual pages in /usr/share/man: /usr/share/man/ja_JP.eucJP/man1 /usr/share/man/ja.eucJP/man1 /usr/share/man/en.eucJP/man1 /usr/share/man/man1 Displaying Specific Manual Files The man utility also supports displaying a specific manual page if passed a path to the file as long as it contains a ‘/’ character. ENVIRONMENT The following environment variables affect the execution of man: LC_ALL, LC_CTYPE, LANG Used to find locale specific manual pages. Valid values can be found by running the locale(1) command. See IMPLEMENTATION NOTES for details. Influenced by the -o option. MACHINE_ARCH, MACHINE Used to find platform specific manual pages. If unset, the output of “sysctl hw.machine_arch” and “sysctl hw.machine” is used respectively. See IMPLEMENTATION NOTES for details. Corresponds to the -m option. MANPATH The standard search path used by man(1) may be changed by specifying a path in the MANPATH environment variable. Invalid paths, or paths without manual databases, are ignored. Overridden by -M. If MANPATH begins with a colon, it is appended to the default list; if it ends with a colon, it is prepended to the default list; or if it contains two adjacent colons, the standard search path is inserted between the colons. If none of these conditions are met, it overrides the standard search path. MANROFFSEQ Used to determine the preprocessors for the manual source before running nroff(1) or troff(1). If unset, defaults to tbl(1). Corresponds to the -p option. MANSECT Restricts manual sections searched to the specified colon delimited list. Corresponds to the -S option. MANWIDTH If set to a numeric value, used as the width manpages should be displayed. Otherwise, if set to a special value “tty”, and output is to a terminal, the pages may be displayed over the whole width of the screen. MANCOLOR If set, enables color support. MANPAGER Program used to display files. If unset, and color support is enabled, “less -sR” is used. If unset, and color support is disabled, then PAGER is used. If that has no value either, “less -s” is used. FILES /etc/man.conf System configuration file. /usr/local/etc/man.d/*.conf Local configuration files. EXIT STATUS The man utility exits 0 on success, and >0 if an error occurs.
|
man, apropos, whatis – display online manual documentation pages
|
man [-adho] [-t | -w] [-M manpath] [-P pager] [-S mansect] [-m arch[:machine]] [-p [eprtv]] [mansect] page ... man -f [-d] [-M manpath] [-P pager] [-S mansect] keyword ... whatis [-d] [-s mansect] keyword ... man -k [-d] [-M manpath] [-P pager] [-S mansect] keyword ... apropos [-d] [-s mansect] keyword ...
| null |
Show the manual page for stat(2): $ man 2 stat Show all manual pages for ‘stat’. $ man -a stat List manual pages which match the regular expression either in the title or in the body: $ man -k '\<copy\>.*archive' Show the manual page for ls(1) and use cat(1) as pager: $ man -P cat ls Show the location of the ls(1) manual page: $ man -w ls SEE ALSO apropos(1), intro(1), mandoc(1), manpath(1), whatis(1), intro(2), intro(3), intro(3lua), intro(4), intro(5), man.conf(5), intro(6), intro(7), mdoc(7), intro(8), intro(9) macOS 14.5 January 9, 2021 macOS 14.5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.