neulab/tldr huggingface dataset:
Twm supports several different ways of manipulating iconified windows. The common pixmap-and-text style may be laid out by hand or automatically arranged as described by the IconRegion variable.  In addition, a terse grid of icon names, called an icon manager, provides a more efficient use of screen space as well as the ability to navigate among windows from the keyboard.
An icon manager is a window that contains names of selected or all windows currently on the display.  In addition to the window name, a small button using the default iconify symbol will be displayed to the left of the name when the window is iconified.  By default, clicking on an entry in the icon manager performs f.iconify.  To change the actions taken in the icon manager, use the the iconmgr context when specifying button and keyboard bindings.
Moving the pointer into the icon manager also directs keyboard focus to the indicated window (setting the focus explicitly or else sending synthetic events NoTitleFocus is set).  Using the f.upiconmgr, f.downiconmgr f.lefticonmgr, and f.righticonmgr functions, the input focus can be changed between windows directly from the keyboard.
The resource manager should have been used instead of all of the window lists.
The IconRegion variable should take a list.
Double clicking very fast to get the constrained move function will sometimes cause the window to move, even though the pointer is not moved.
If IconifyByUnmapping is on and windows are listed in IconManagerDontShow but not in DontIconifyByUnmapping, they may be lost if they are iconified and no bindings to f.menu "TwmWindows" or f.warpto are setup.
$HOME/.twmrc.<screen number> $HOME/.twmrc /usr/lib/X11/twm/system.twmrc
DISPLAY This variable is used to determine which X server to use.  It is also set during f.exec so that programs come up on the proper screen.
HOME    This variable is used as the prefix for files that begin with a tilde and for locating the twm startup file.
X(7), Xserver(1), xdm(1), xrdb(1)
Tom LaStrange, Solbourne Computer; Jim Fulton, MIT X Consortium; Steve Pitschke, Stardent Computer; Keith Packard, MIT X Consortium; Dave Sternlicht, MIT X Consortium; Dave Payne, Apple Computer.
GIT-ADD(1)                         Git Manual                         GIT-ADD(1)
git-add - Add file contents to the index
git add [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p] [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]] [--sparse] [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] [--renormalize] [--chmod=(+|-)x] [--pathspec-from-file=<file> [--pathspec-file-nul]] [--] [<pathspec>...]
This command updates the index using the current content found in the working tree, to prepare the content staged for the next commit. It typically adds the current content of existing paths as a whole, but with some options it can also be used to add content with only part of the changes made to the working tree files applied, or remove paths that do not exist in the working tree anymore.
The "index" holds a snapshot of the content of the working tree, and it is this snapshot that is taken as the contents of the next commit. Thus after making any changes to the working tree, and before running the commit command, you must use the add command to add any new or modified files to the index.
This command can be performed multiple times before a commit. It only adds the content of the specified file(s) at the time the add command is run; if you want subsequent changes included in the next commit, then you must run git add again to add the new content to the index.
The git status command can be used to obtain a summary of which files have changes that are staged for the next commit.
The git add command will not add ignored files by default. If any ignored files were explicitly specified on the command line, git add will fail with a list of ignored files. Ignored files reached by directory recursion or filename globbing performed by Git (quote your globs before the shell) will be silently ignored. The git add command can be used to add ignored files with the -f (force) option.
Please see git-commit(1) for alternative ways to add content to a commit.
<pathspec>... Files to add content from. Fileglobs (e.g.  *.c) can be given to add all matching files. Also a leading directory name (e.g.  dir to add dir/file1 and dir/file2) can be given to update the index to match the current state of the directory as a whole (e.g. specifying dir will record not just a file dir/file1 modified in the working tree, a file dir/file2 added to the working tree, but also a file dir/file3 removed from the working tree). Note that older versions of Git used to ignore removed files; use --no-all option if you want to add modified or new files but ignore removed ones.
-n, --dry-run Don’t actually add the file(s), just show if they exist and/or will be ignored.
-f, --force Allow adding otherwise ignored files.
--sparse Allow updating index entries outside of the sparse-checkout cone. Normally, git add refuses to update index entries whose paths do not fit within the sparse-checkout cone, since those files might be removed from the working tree without warning. See git-sparse- checkout(1) for more details.
-i, --interactive Add modified contents in the working tree interactively to the index. Optional path arguments may be supplied to limit operation to a subset of the working tree. See “Interactive mode” for details.
-p, --patch Interactively choose hunks of patch between the index and the work tree and add them to the index. This gives the user a chance to review the difference before adding modified contents to the index.
This effectively runs add --interactive, but bypasses the initial command menu and directly jumps to the patch subcommand. See “Interactive mode” for details.
-e, --edit Open the diff vs. the index in an editor and let the user edit it. After the editor was closed, adjust the hunk headers and apply the patch to the index.
The intent of this option is to pick and choose lines of the patch to apply, or even to modify the contents of lines to be staged. This can be quicker and more flexible than using the interactive hunk selector. However, it is easy to confuse oneself and create a patch that does not apply to the index. See EDITING PATCHES below.
-u, --update Update the index just where it already has an entry matching <pathspec>. This removes as well as modifies index entries to match the working tree, but adds no new files.
If no <pathspec> is given when -u option is used, all tracked files in the entire working tree are updated (old versions of Git used to limit the update to the current directory and its subdirectories).
-A, --all, --no-ignore-removal Update the index not only where the working tree has a file matching <pathspec> but also where the index already has an entry. This adds, modifies, and removes index entries to match the working tree.
If no <pathspec> is given when -A option is used, all files in the entire working tree are updated (old versions of Git used to limit the update to the current directory and its subdirectories).
--no-all, --ignore-removal Update the index by adding new files that are unknown to the index and files modified in the working tree, but ignore files that have been removed from the working tree. This option is a no-op when no <pathspec> is used.
This option is primarily to help users who are used to older versions of Git, whose "git add <pathspec>..." was a synonym for "git add --no-all <pathspec>...", i.e. ignored removed files.
-N, --intent-to-add Record only the fact that the path will be added later. An entry for the path is placed in the index with no content. This is useful for, among other things, showing the unstaged content of such files with git diff and committing them with git commit -a.
--refresh Don’t add the file(s), but only refresh their stat() information in the index.
--ignore-errors If some files could not be added because of errors indexing them, do not abort the operation, but continue adding the others. The command shall still exit with non-zero status. The configuration variable add.ignoreErrors can be set to true to make this the default behaviour.
--ignore-missing This option can only be used together with --dry-run. By using this option the user can check if any of the given files would be ignored, no matter if they are already present in the work tree or not.
--no-warn-embedded-repo By default, git add will warn when adding an embedded repository to the index without using git submodule add to create an entry in .gitmodules. This option will suppress the warning (e.g., if you are manually performing operations on submodules).
--renormalize Apply the "clean" process freshly to all tracked files to forcibly add them again to the index. This is useful after changing core.autocrlf configuration or the text attribute in order to correct files added with wrong CRLF/LF line endings. This option implies -u.
--chmod=(+|-)x Override the executable bit of the added files. The executable bit is only changed in the index, the files on disk are left unchanged.
•   Adds content from all *.txt files under Documentation directory and its subdirectories:
$ git add Documentation/\*.txt
Note that the asterisk * is quoted from the shell in this example; this lets the command include the files from subdirectories of Documentation/ directory.
•   Considers adding content from all git-*.sh scripts:
$ git add git-*.sh
Because this example lets the shell expand the asterisk (i.e. you are listing the files explicitly), it does not consider subdir/git-foo.sh.
When the command enters the interactive mode, it shows the output of the status subcommand, and then goes into its interactive command loop.
The command loop shows the list of subcommands available, and gives a prompt "What now> ". In general, when the prompt ends with a single >, you can pick only one of the choices given and type return, like this:
*** Commands *** 1: status       2: update       3: revert       4: add untracked 5: patch        6: diff         7: quit         8: help What now> 1
You also could say s or sta or status above as long as the choice is unique.
The main command loop has 6 subcommands (plus help and quit).
status This shows the change between HEAD and index (i.e. what will be committed if you say git commit), and between index and working tree files (i.e. what you could stage further before git commit using git add) for each path. A sample output looks like this:
staged     unstaged path 1:       binary      nothing foo.png 2:     +403/-35        +1/-1 git-add--interactive.perl
It shows that foo.png has differences from HEAD (but that is binary so line count cannot be shown) and there is no difference between indexed copy and the working tree version (if the working tree version were also different, binary would have been shown in place of nothing). The other file, git-add--interactive.perl, has 403 lines added and 35 lines deleted if you commit what is in the index, but working tree file has further modifications (one addition and one deletion).
update This shows the status information and issues an "Update>>" prompt. When the prompt ends with double >>, you can make more than one selection, concatenated with whitespace or comma. Also you can say ranges. E.g. "2-5 7,9" to choose 2,3,4,5,7,9 from the list. If the second number in a range is omitted, all remaining patches are taken. E.g. "7-" to choose 7,8,9 from the list. You can say * to choose everything.
What you chose are then highlighted with *, like this:
staged     unstaged path 1:       binary      nothing foo.png * 2:     +403/-35        +1/-1 git-add--interactive.perl
To remove selection, prefix the input with - like this:
Update>> -2
After making the selection, answer with an empty line to stage the contents of working tree files for selected paths in the index.
revert This has a very similar UI to update, and the staged information for selected paths are reverted to that of the HEAD version. Reverting new paths makes them untracked.
add untracked This has a very similar UI to update and revert, and lets you add untracked paths to the index.
patch This lets you choose one path out of a status like selection. After choosing the path, it presents the diff between the index and the working tree file and asks you if you want to stage the change of each hunk. You can select one of the following options and type return:
y - stage this hunk n - do not stage this hunk q - quit; do not stage this hunk or any of the remaining ones a - stage this hunk and all later hunks in the file d - do not stage this hunk or any of the later hunks in the file g - select a hunk to go to / - search for a hunk matching the given regex j - leave this hunk undecided, see next undecided hunk J - leave this hunk undecided, see next hunk k - leave this hunk undecided, see previous undecided hunk K - leave this hunk undecided, see previous hunk s - split the current hunk into smaller hunks e - manually edit the current hunk ? - print help
After deciding the fate for all hunks, if there is any hunk that was chosen, the index is updated with the selected hunks.
You can omit having to type return here, by setting the configuration variable interactive.singleKey to true.
diff This lets you review what will be committed (i.e. between HEAD and index).
Invoking git add -e or selecting e from the interactive hunk selector will open a patch in your editor; after the editor exits, the result is applied to the index. You are free to make arbitrary changes to the patch, but note that some changes may have confusing results, or even result in a patch that cannot be applied. If you want to abort the operation entirely (i.e., stage nothing new in the index), simply delete all lines of the patch. The list below describes some common things you may see in a patch, and which editing operations make sense on them.
added content Added content is represented by lines beginning with "+". You can prevent staging any addition lines by deleting them.
removed content Removed content is represented by lines beginning with "-". You can prevent staging their removal by converting the "-" to a " " (space).
modified content Modified content is represented by "-" lines (removing the old content) followed by "+" lines (adding the replacement content). You can prevent staging the modification by converting "-" lines to " ", and removing "+" lines. Beware that modifying only half of the pair is likely to introduce confusing changes to the index.
There are also more complex operations that can be performed. But beware that because the patch is applied only to the index and not the working tree, the working tree will appear to "undo" the change in the index. For example, introducing a new line into the index that is in neither the HEAD nor the working tree will stage the new line for commit, but the line will appear to be reverted in the working tree.
Avoid using these constructs, or do so with extreme caution.
removing untouched content Content which does not differ between the index and working tree may be shown on context lines, beginning with a " " (space). You can stage context lines for removal by converting the space to a "-". The resulting working tree file will appear to re-add the content.
modifying existing content One can also modify context lines by staging them for removal (by converting " " to "-") and adding a "+" line with the new content. Similarly, one can modify "+" lines for existing additions or modifications. In all cases, the new modification will appear reverted in the working tree.
new content You may also add new content that does not exist in the patch; simply add new lines, each starting with "+". The addition will appear reverted in the working tree.
There are also several operations which should be avoided entirely, as they will make the patch impossible to apply:
•   adding context (" ") or removal ("-") lines
•   deleting context or removal lines
•   modifying the contents of context or removal lines
git-status(1) git-rm(1) git-reset(1) git-mv(1) git-commit(1) git-update- index(1)
SMBPASSWD(8)               System Administration tools              SMBPASSWD(8)
smbpasswd - change a user's SMB password
smbpasswd [-a] [-c <config file>] [-x] [-d] [-e] [-D debuglevel] [-n] [-r <remote machine>] [-R <name resolve order>] [-m] [-U username[%password]] [-h] [-s] [-w pass] [-W] [-i] [-L] [username]
The smbpasswd program has several different functions, depending on whether it is run by the root user or not. When run as a normal user it allows the user to change the password used for their SMB sessions on any machines that store SMB passwords.
By default (when run with no arguments) it will attempt to change the current user's SMB password on the local machine. This is similar to the way the passwd(1) program works.  smbpasswd differs from how the passwd program works however in that it is not setuid root but works in a client-server mode and communicates with a locally running smbd(8). As a consequence in order for this to succeed the smbd daemon must be running on the local machine. On a UNIX machine the encrypted SMB passwords are usually stored in the default passdb backend.
When run by an ordinary user with no options, smbpasswd will prompt them for their old SMB password and then ask them for their new password twice, to ensure that the new password was typed correctly. No passwords will be echoed on the screen whilst being typed. If you have a blank SMB password (specified by the string "NO PASSWORD" in the smbpasswd file) then just press the <Enter> key when asked for your old password.
smbpasswd can also be used by a normal user to change their SMB password on remote machines, such as Windows NT Primary Domain Controllers. See the (-r) and -U options below.
When run by root, smbpasswd allows new users to be added and deleted in the smbpasswd file, as well as allows changes to the attributes of the user in this file to be made. When run by root, smbpasswd accesses the local smbpasswd file directly, thus enabling changes to be made even if smbd is not running.
-a This option specifies that the username following should be added to the local smbpasswd file, with the new password typed (type <Enter> for the old password). This option is ignored if the username following already exists in the smbpasswd file and it is treated like a regular change password command. Note that the default passdb backends require the user to already exist in the system password file (usually /etc/passwd), else the request to add the user will fail.
This option is only available when running smbpasswd as root.
-c This option can be used to specify the path and file name of the smb.conf configuration file when it is important to use other than the default file and / or location.
-x This option specifies that the username following should be deleted from the local smbpasswd file.
-d This option specifies that the username following should be disabled in the local smbpasswd file. This is done by writing a 'D' flag into the account control space in the smbpasswd file. Once this is done all attempts to authenticate via SMB using this username will fail.
If the smbpasswd file is in the 'old' format (pre-Samba 2.0 format) there is no space in the user's password entry to write this information and the command will FAIL. See smbpasswd(5) for details on the 'old' and new password file formats.
-e This option specifies that the username following should be enabled in the local smbpasswd file, if the account was previously disabled. If the account was not disabled this option has no effect. Once the account is enabled then the user will be able to authenticate via SMB once again.
If the smbpasswd file is in the 'old' format, then smbpasswd will FAIL to enable the account. See smbpasswd(5) for details on the 'old' and new password file formats.
-D debuglevel debuglevel is an integer from 0 to 10. The default value if this parameter is not specified is zero.
The higher this value, the more detail will be logged to the log files about the activities of smbpasswd. At level 0, only critical errors and serious warnings will be logged.
-n This option specifies that the username following should have their password set to null (i.e. a blank password) in the local smbpasswd file. This is done by writing the string "NO PASSWORD" as the first part of the first password stored in the smbpasswd file.
Note that to allow users to logon to a Samba server once the password has been set to "NO PASSWORD" in the smbpasswd file the administrator must set the following parameter in the [global] section of the smb.conf file :
null passwords = yes
-r remote machine name This option allows a user to specify what machine they wish to change their password on. Without this parameter smbpasswd defaults to the local host. The remote machine name is the NetBIOS name of the SMB/CIFS server to contact to attempt the password change. This name is resolved into an IP address using the standard name resolution mechanism in all programs of the Samba suite. See the -R name resolve order parameter for details on changing this resolving mechanism.
The username whose password is changed is that of the current UNIX logged on user. See the -U username parameter for details on changing the password for a different username.
Note that if changing a Windows NT Domain password the remote machine specified must be the Primary Domain Controller for the domain (Backup Domain Controllers only have a read-only copy of the user account database and will not allow the password change).
Note that Windows 95/98 do not have a real password database so it is not possible to change passwords specifying a Win95/98 machine as remote machine target.
-R name resolve order This option allows the user of smbpasswd to determine what name resolution services to use when looking up the NetBIOS name of the host being connected to.
The options are :"lmhosts", "host", "wins" and "bcast". They cause names to be resolved as follows:
•   host: Do a standard host name to IP address resolution, using the system /etc/hosts, NIS, or DNS lookups. This method of name resolution is operating system depended for instance on IRIX or Solaris this may be controlled by the /etc/nsswitch.conf file). Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored.
The default order is lmhosts, host, wins, bcast and without this parameter or any entry in the smb.conf(5) file the name resolution methods will be attempted in this order.
-m This option tells smbpasswd that the account being changed is a MACHINE account. Currently this is used when Samba is being used as an NT Primary Domain Controller.
-U username This option may only be used in conjunction with the -r option. When changing a password on a remote machine it allows the user to specify the user name on that machine whose password will be changed. It is present to allow users who have different user names on different systems to change these passwords.
-h This option prints the help string for smbpasswd, selecting the correct one for running as root or as an ordinary user.
-s This option causes smbpasswd to be silent (i.e. not issue prompts) and to read its old and new passwords from standard input, rather than from /dev/tty (like the passwd(1) program does). This option is to aid people writing scripts to drive smbpasswd
-w password This parameter is only available if Samba has been compiled with LDAP support. The -w switch is used to specify the password to be used with the ldap admin dn. Note that the password is stored in the secrets.tdb and is keyed off of the admin's DN. This means that if the value of ldap admin dn ever changes, the password will need to be manually updated as well.
-W NOTE: This option is same as "-w" except that the password should be entered using stdin.
This parameter is only available if Samba has been compiled with LDAP support. The -W switch is used to specify the password to be used with the ldap admin dn. Note that the password is stored in the secrets.tdb and is keyed off of the admin's DN. This means that if the value of ldap admin dn ever changes, the password will need to be manually updated as well.
-i This option tells smbpasswd that the account being changed is an interdomain trust account. Currently this is used when Samba is being used as an NT Primary Domain Controller. The account contains the info about another trusted domain.
-L Run in local mode.
username This specifies the username for all of the root only options to operate on. Only root can specify this parameter as only root has the permission needed to modify attributes directly in the local smbpasswd file.
Since smbpasswd works in client-server mode communicating with a local smbd for a non-root user then the smbd daemon must be running for this to work. A common problem is to add a restriction to the hosts that may access the smbd running on the local machine by specifying either allow hosts or deny hosts entry in the smb.conf(5) file and neglecting to allow "localhost" access to the smbd.
In addition, the smbpasswd command is only useful if Samba has been set up to use encrypted passwords.
smbpasswd(5), Samba(7).
ZSTD(1)                           User Commands                          ZSTD(1)
zstd - zstd, zstdmt, unzstd, zstdcat - Compress or decompress .zst files
zstd [OPTIONS] [-|INPUT-FILE] [-o OUTPUT-FILE]
zstdmt is equivalent to zstd -T0
unzstd is equivalent to zstd -d
zstdcat is equivalent to zstd -dcf
zstd is a fast lossless compression algorithm and data compression tool, with command line syntax similar to gzip (1) and xz (1). It is based on the LZ77 family, with further FSE & huff0 entropy stages. zstd offers highly configurable compression speed, with fast modes at > 200 MB/s per core, and strong modes nearing lzma compression ratios. It also features a very fast decoder, with speeds > 500 MB/s per core.
zstd command line syntax is generally similar to gzip, but features the following differences :
•   Source files are preserved by default. It´s possible to remove them automatically by using the --rm command.
•   When compressing a single file, zstd displays progress notifications and result summary by default. Use -q to turn them off.
•   zstd does not accept input from console, but it properly accepts stdin when it´s not the console.
•   zstd displays a short help page when command line is an error. Use -q to turn it off.
zstd compresses or decompresses each file according to the selected operation mode. If no files are given or file is -, zstd reads from standard input and writes the processed data to standard output. zstd will refuse to write compressed data to standard output if it is a terminal : it will display an error message and skip the file. Similarly, zstd will refuse to read compressed data from standard input if it is a terminal.
Unless --stdout or -o is specified, files are written to a new file whose name is derived from the source file name:
•   When compressing, the suffix .zst is appended to the source filename to get the target filename.
•   When decompressing, the .zst suffix is removed from the source filename to get the target filename
Concatenation with .zst files It is possible to concatenate .zst files as is. zstd will decompress such files as if they were a single .zst file.
Integer suffixes and special values In most places where an integer argument is expected, an optional suffix is supported to easily indicate large integers. There must be no space between the integer and the suffix.
KiB    Multiply the integer by 1,024 (2^10). Ki, K, and KB are accepted as synonyms for KiB.
MiB    Multiply the integer by 1,048,576 (2^20). Mi, M, and MB are accepted as synonyms for MiB.
-z, --compress Compress. This is the default operation mode when no operation mode option is specified and no other operation mode is implied from the command name (for example, unzstd implies --decompress).
-t, --test Test the integrity of compressed files. This option is equivalent to --decompress --stdout except that the decompressed data is discarded instead of being written to standard output. No files are created or removed.
-b#    Benchmark file(s) using compression level #
--train FILEs Use FILEs as a training set to create a dictionary. The training set should contain a lot of small files (> 100).
-l, --list Display information related to a zstd compressed file, such as size, ratio, and checksum. Some of these fields may not be available. This command can be augmented with the -v modifier.
Operation modifiers •   -#: # compression level [1-19] (default: 3)
•   --ultra: unlocks high compression levels 20+ (maximum 22), using a lot more memory. Note that decompression will also require more memory when using these levels.
•   --fast[=#]: switch to ultra-fast compression levels. If =# is not present, it defaults to 1. The higher the value, the faster the compression speed, at the cost of some compression ratio. This setting overwrites compression level if one was set previously. Similarly, if a compression level is set after --fast, it overrides it.
•   -T#, --threads=#: Compress using # working threads (default: 1). If # is 0, attempt to detect and use the number of physical CPU cores. In all cases, the nb of threads is capped to ZSTDMT_NBWORKERS_MAX, which is either 64 in 32-bit mode, or 256 for 64-bit environments. This modifier does nothing if zstd is compiled without multithread support.
•   --single-thread: Does not spawn a thread for compression, use a single thread for both I/O and compression. In this mode, compression is serialized with I/O, which is slightly slower. (This is different from -T1, which spawns 1 compression thread in parallel of I/O). This mode is the only one available when multithread support is disabled. Single-thread mode features lower memory usage. Final compressed result is slightly different from -T1.
•   --adapt[=min=#,max=#] : zstd will dynamically adapt compression level to perceived I/O conditions. Compression level adaptation can be observed live by using command -v. Adaptation can be constrained between supplied min and max levels. The feature works when combined with multi-threading and --long mode. It does not work with --single-thread. It sets window size to 8 MB by default (can be changed manually, see wlog). Due to the chaotic nature of dynamic adaptation, compressed result is not reproducible. note : at the time of this writing, --adapt can remain stuck at low speed when combined with multiple worker threads (>=2).
•   --long[=#]: enables long distance matching with # windowLog, if not # is not present it defaults to 27. This increases the window size (windowLog) and memory usage for both the compressor and decompressor. This setting is designed to improve the compression ratio for files with long matches at a large distance.
Note: If windowLog is set to larger than 27, --long=windowLog or --memory=windowSize needs to be passed to the decompressor.
•   -D DICT: use DICT as Dictionary to compress or decompress FILE(s)
•   --patch-from FILE: Specify the file to be used as a reference point for zstd´s diff engine. This is effectively dictionary compression with some convenient parameter selection, namely that windowSize > srcSize.
Note: cannot use both this and -D together Note: --long mode will be automatically activated if chainLog < fileLog (fileLog being the windowLog required to cover the whole file). You can also manually force it. Node: for all levels, you can use --patch-from in --single-thread mode to improve compression ratio at the cost of speed Note: for level 19, you can get increased compression ratio at the cost of speed by specifying --zstd=targetLength= to be something large (i.e 4096), and by setting a large --zstd=chainLog=
•   --rsyncable : zstd will periodically synchronize the compression state to make the compressed file more rsync-friendly. There is a negligible impact to compression ratio, and the faster compression levels will see a small compression speed hit. This feature does not work with --single-thread. You probably don´t want to use it with long range mode, since it will decrease the effectiveness of the synchronization points, but your milage may vary.
•   -C, --[no-]check: add integrity check computed from uncompressed data (default: enabled)
•   --[no-]content-size: enable / disable whether or not the original size of the file is placed in the header of the compressed file. The default option is --content-size (meaning that the original size will be placed in the header).
•   --no-dictID: do not store dictionary ID within frame header (dictionary compression). The decoder will have to rely on implicit knowledge about which dictionary to use, it won´t be able to check if it´s correct.
•   -M#, --memory=#: Set a memory usage limit. By default, Zstandard uses 128 MB for decompression as the maximum amount of memory the decompressor is allowed to use, but you can override this manually if need be in either direction (ie. you can increase or decrease it).
This is also used during compression when using with --patch-from=. In this case, this parameter overrides that maximum size allowed for a dictionary. (128 MB).
•   --stream-size=# : Sets the pledged source size of input coming from a stream. This value must be exact, as it will be included in the produced frame header. Incorrect stream sizes will cause an error. This information will be used to better optimize compression parameters, resulting in better and potentially faster compression, especially for smaller source sizes.
•   --size-hint=#: When handling input from a stream, zstd must guess how large the source size will be when optimizing compression parameters. If the stream size is relatively small, this guess may be a poor one, resulting in a higher compression ratio than expected. This feature allows for controlling the guess when needed. Exact guesses result in better compression ratios. Overestimates result in slightly degraded compression ratios, while underestimates may result in significant degradation.
•   -o FILE: save result into FILE
•   -f, --force: disable input and output checks. Allows overwriting existing files, input from console, output to stdout, operating on links, block devices, etc.
•   -c, --stdout: force write to standard output, even if it is the console
•   --[no-]sparse: enable / disable sparse FS support, to make files with many zeroes smaller on disk. Creating sparse files may save disk space and speed up decompression by reducing the amount of disk I/O. default: enabled when output is into a file, and disabled when output is stdout. This setting overrides default and can force sparse mode over stdout.
•   --rm: remove source file(s) after successful compression or decompression. If used in combination with -o, will trigger a confirmation prompt (which can be silenced with -f), as this is a destructive operation.
•   -k, --keep: keep source file(s) after successful compression or decompression. This is the default behavior.
•   -r: operate recursively on directories
•   --filelist FILE read a list of files to process as content from FILE. Format is compatible with ls output, with one file per line.
•   --output-dir-flat DIR: resulting files are stored into target DIR directory, instead of same directory as origin file. Be aware that this command can introduce name collision issues, if multiple files, from different directories, end up having the same name. Collision resolution ensures first file with a given name will be present in DIR, while in combination with -f, the last file will be present instead.
•   --output-dir-mirror DIR: similar to --output-dir-flat, the output files are stored underneath target DIR directory, but this option will replicate input directory hierarchy into output DIR.
If input directory contains "..", the files in this directory will be ignored. If input directory is an absolute directory (i.e. "/var/tmp/abc"), it will be stored into the "output-dir/var/tmp/abc". If there are multiple input files or directories, name collision resolution will follow the same rules as --output-dir-flat.
•   --format=FORMAT: compress and decompress in other formats. If compiled with support, zstd can compress to or decompress from other compression algorithm formats. Possibly available options are zstd, gzip, xz, lzma, and lz4. If no such format is provided, zstd is the default.
•   -h/-H, --help: display help/long help and exit
•   -V, --version: display version number and exit. Advanced : -vV also displays supported formats. -vvV also displays POSIX support. -q will only display the version number, suitable for machine reading.
•   -v, --verbose: verbose mode, display more information
•   -q, --quiet: suppress warnings, interactivity, and notifications. specify twice to suppress errors too.
•   --no-progress: do not display the progress bar, but keep all other messages.
•   --show-default-cparams: Shows the default compression parameters that will be used for a particular src file. If the provided src file is not a regular file (eg. named pipe), the cli will just output the default parameters. That is, the parameters that are used when the src size is unknown.
•   --: All arguments after -- are treated as files
Restricted usage of Environment Variables Using environment variables to set parameters has security implications. Therefore, this avenue is intentionally restricted. Only ZSTD_CLEVEL and ZSTD_NBTHREADS are currently supported. They set the compression level and number of threads to use during compression, respectively.
ZSTD_CLEVEL can be used to set the level between 1 and 19 (the "normal" range). If the value of ZSTD_CLEVEL is not a valid integer, it will be ignored with a warning message. ZSTD_CLEVEL just replaces the default compression level (3).
ZSTD_NBTHREADS can be used to set the number of threads zstd will attempt to use during compression. If the value of ZSTD_NBTHREADS is not a valid unsigned integer, it will be ignored with a warning message. ZSTD_NBTHREADS has a default value of (1), and is capped at ZSTDMT_NBWORKERS_MAX==200. zstd must be compiled with multithread support for this to have any effect.
They can both be overridden by corresponding command line arguments: -# for compression level and -T# for number of compression threads.
zstd offers dictionary compression, which greatly improves efficiency on small files and messages. It´s possible to train zstd with a set of samples, the result of which is saved into a file called a dictionary. Then during compression and decompression, reference the same dictionary, using command -D dictionaryFileName. Compression of small files similar to the sample set will be greatly improved.
--train FILEs Use FILEs as training set to create a dictionary. The training set should contain a lot of small files (> 100), and weight typically 100x the target dictionary size (for example, 10 MB for a 100 KB dictionary).
Supports multithreading if zstd is compiled with threading support. Additional parameters can be specified with --train-fastcover. The legacy dictionary builder can be accessed with --train-legacy. The cover dictionary builder can be accessed with --train-cover. Equivalent to --train-fastcover=d=8,steps=4.
-o file Dictionary saved into file (default name: dictionary).
--maxdict=# Limit dictionary to specified size (default: 112640).
-#     Use # compression level during training (optional). Will generate statistics more tuned for selected compression level, resulting in a small compression ratio improvement for this level.
-B#    Split input files in blocks of size # (default: no split)
--dictID=# A dictionary ID is a locally unique ID that a decoder can use to verify it is using the right dictionary. By default, zstd will create a 4-bytes random number ID. It´s possible to give a precise number instead. Short numbers have an advantage : an ID < 256 will only need 1 byte in the compressed frame header, and an ID < 65536 will only need 2 bytes. This compares favorably to 4 bytes default. However, it´s up to the dictionary manager to not assign twice the same ID to 2 different dictionaries.
--train-cover[=k#,d=#,steps=#,split=#,shrink[=#]] Select parameters for the default dictionary builder algorithm named cover. If d is not specified, then it tries d = 6 and d = 8. If k is not specified, then it tries steps values in the range [50, 2000]. If steps is not specified, then the default value of 40 is used. If split is not specified or split <= 0, then the default value of 100 is used. Requires that d <= k. If shrink flag is not used, then the default value for shrinkDict of 0 is used. If shrink is not specified, then the default value for shrinkDictMaxRegression of 1 is used.
Selects segments of size k with highest score to put in the dictionary. The score of a segment is computed by the sum of the frequencies of all the subsegments of size d. Generally d should be in the range [6, 8], occasionally up to 16, but the algorithm will run faster with d <= 8. Good values for k vary widely based on the input data, but a safe range is [2 * d, 2000]. If split is 100, all input samples are used for both training and testing to find optimal d and k to build dictionary. Supports multithreading if zstd is compiled with threading support. Having shrink enabled takes a truncated dictionary of minimum size and doubles in size until compression ratio of the truncated dictionary is at most shrinkDictMaxRegression% worse than the compression ratio of the largest dictionary.
zstd --train-cover FILEs
zstd --train-cover=k=50,d=8 FILEs
zstd --train-cover=d=8,steps=500 FILEs
zstd --train-cover=k=50 FILEs
zstd --train-cover=k=50,split=60 FILEs
zstd --train-cover=shrink FILEs
zstd --train-cover=shrink=2 FILEs
--train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#] Same as cover but with extra parameters f and accel and different default value of split If split is not specified, then it tries split = 75. If f is not specified, then it tries f = 20. Requires that 0 < f < 32. If accel is not specified, then it tries accel = 1. Requires that 0 < accel <= 10. Requires that d = 6 or d = 8.
f is log of size of array that keeps track of frequency of subsegments of size d. The subsegment is hashed to an index in the range [0,2^f - 1]. It is possible that 2 different subsegments are hashed to the same index, and they are considered as the same subsegment when computing frequency. Using a higher f reduces collision but takes longer.
zstd --train-fastcover FILEs
zstd --train-fastcover=d=8,f=15,accel=2 FILEs
--train-legacy[=selectivity=#] Use legacy dictionary builder algorithm with the given dictionary selectivity (default: 9). The smaller the selectivity value, the denser the dictionary, improving its efficiency but reducing its possible maximum size. --train-legacy=s=# is also accepted.
zstd --train-legacy FILEs
zstd --train-legacy=selectivity=8 FILEs
-b#    benchmark file(s) using compression level #
-e#    benchmark file(s) using multiple compression levels, from -b# to -e# (inclusive)
-i#    minimum evaluation time, in seconds (default: 3s), benchmark mode only
-B#, --block-size=# cut file(s) into independent blocks of size # (default: no block)
--priority=rt set process priority to real-time
Output Format: CompressionLevel#Filename : IntputSize -> OutputSize (CompressionRatio), CompressionSpeed, DecompressionSpeed
Methodology: For both compression and decompression speed, the entire input is compressed/decompressed in-memory to measure speed. A run lasts at least 1 sec, so when files are small, they are compressed/decompressed several times per run, in order to improve measurement accuracy.
-B#: Select the size of each compression job. This parameter is only available when multi-threading is enabled. Each compression job is run in parallel, so this value indirectly impacts the nb of active threads. Default job size varies depending on compression level (generally 4 * windowSize). -B# makes it possible to manually select a custom size. Note that job size must respect a minimum value which is enforced transparently. This minimum is either 512 KB, or overlapSize, whichever is largest. Different job sizes will lead to (slightly) different compressed frames.
--zstd[=options]: zstd provides 22 predefined compression levels. The selected or default predefined compression level can be changed with advanced compression options. The options are provided as a comma-separated list. You may specify only the options you want to change and the rest will be taken from the selected or default compression level. The list of available options:
strategy=strat, strat=strat Specify a strategy used by a match finder.
There are 9 strategies numbered from 1 to 9, from faster to stronger: 1=ZSTD_fast, 2=ZSTD_dfast, 3=ZSTD_greedy, 4=ZSTD_lazy, 5=ZSTD_lazy2, 6=ZSTD_btlazy2, 7=ZSTD_btopt, 8=ZSTD_btultra, 9=ZSTD_btultra2.
windowLog=wlog, wlog=wlog Specify the maximum number of bits for a match distance.
The higher number of increases the chance to find a match which usually improves compression ratio. It also increases memory requirements for the compressor and decompressor. The minimum wlog is 10 (1 KiB) and the maximum is 30 (1 GiB) on 32-bit platforms and 31 (2 GiB) on 64-bit platforms.
hashLog=hlog, hlog=hlog Specify the maximum number of bits for a hash table.
Bigger hash tables cause less collisions which usually makes compression faster, but requires more memory during compression.
The minimum hlog is 6 (64 B) and the maximum is 30 (1 GiB).
chainLog=clog, clog=clog Specify the maximum number of bits for a hash chain or a binary tree.
Higher numbers of bits increases the chance to find a match which usually improves compression ratio. It also slows down compression speed and increases memory requirements for compression. This option is ignored for the ZSTD_fast strategy.
The minimum clog is 6 (64 B) and the maximum is 29 (524 Mib) on 32-bit platforms and 30 (1 Gib) on 64-bit platforms.
searchLog=slog, slog=slog Specify the maximum number of searches in a hash chain or a binary tree using logarithmic scale.
More searches increases the chance to find a match which usually increases compression ratio but decreases compression speed.
The minimum slog is 1 and the maximum is ´windowLog´ - 1.
minMatch=mml, mml=mml Specify the minimum searched length of a match in a hash table.
Larger search lengths usually decrease compression ratio but improve decompression speed.
The minimum mml is 3 and the maximum is 7.
targetLength=tlen, tlen=tlen The impact of this field vary depending on selected strategy.
For ZSTD_btopt, ZSTD_btultra and ZSTD_btultra2, it specifies the minimum match length that causes match finder to stop searching. A larger targetLength usually improves compression ratio but decreases compression speed. t For ZSTD_fast, it triggers ultra-fast mode when > 0. The value represents the amount of data skipped between match sampling. Impact is reversed : a larger targetLength increases compression speed but decreases compression ratio.
For all other strategies, this field has no impact.
The minimum tlen is 0 and the maximum is 128 Kib.
overlapLog=ovlog, ovlog=ovlog Determine overlapSize, amount of data reloaded from previous job. This parameter is only available when multithreading is enabled. Reloading more data improves compression ratio, but decreases speed.
The minimum ovlog is 0, and the maximum is 9. 1 means "no overlap", hence completely independent jobs. 9 means "full overlap", meaning up to windowSize is reloaded from previous job. Reducing ovlog by 1 reduces the reloaded amount by a factor 2. For example, 8 means "windowSize/2", and 6 means "windowSize/8". Value 0 is special and means "default" : ovlog is automatically determined by zstd. In which case, ovlog will range from 6 to 9, depending on selected strat.
ldmHashLog=lhlog, lhlog=lhlog Specify the maximum size for a hash table used for long distance matching.
This option is ignored unless long distance matching is enabled.
Bigger hash tables usually improve compression ratio at the expense of more memory during compression and a decrease in compression speed.
The minimum lhlog is 6 and the maximum is 30 (default: 20).
ldmMinMatch=lmml, lmml=lmml Specify the minimum searched length of a match for long distance matching.
Larger/very small values usually decrease compression ratio.
The minimum lmml is 4 and the maximum is 4096 (default: 64).
ldmBucketSizeLog=lblog, lblog=lblog Specify the size of each bucket for the hash table used for long distance matching.
Larger bucket sizes improve collision resolution but decrease compression speed.
The minimum lblog is 1 and the maximum is 8 (default: 3).