neulab/tldr huggingface dataset:
The gzip command uses the Lempel-Ziv algorithm used in zip and PKZIP. The amount of compression obtained depends on the size of the input and the distribution of common substrings.  Typically, text such as source code or English is reduced by 60-70%.  Compression is generally much better than that achieved by LZW (as used in compress), Huffman coding (as used in pack), or adaptive Huffman coding (compact).
Compression is always performed, even if the compressed file is slightly larger than the original. The worst case expansion is a few bytes for the gzip file header, plus 5 bytes every 32K block, or an expansion ratio of 0.015% for large files. Note that the actual number of used disk blocks almost never increases.  gzip preserves the mode, ownership and timestamps of files when compressing or decompressing.
-a --ascii Ascii text mode: convert end-of-lines using local conventions. This option is supported only on some non-Unix systems. For MSDOS, CR LF is converted to LF when compressing, and LF is converted to CR LF when decompressing.
-c --stdout --to-stdout Write output on standard output; keep original files unchanged. If there are several input files, the output consists of a sequence of independently compressed members. To obtain better compression, concatenate all input files before compressing them.
-d --decompress --uncompress Decompress.
-f --force Force compression or decompression even if the file has multiple links or the corresponding file already exists, or if the compressed data is read from or written to a terminal. If the input data is not in a format recognized by gzip, and if the option --stdout is also given, copy the input data without change to the standard output: let zcat behave as cat.  If -f is not given, and when not running in the background, gzip prompts to verify whether an existing file should be overwritten.
-h --help Display a help screen and quit.
-k --keep Keep (don't delete) input files during compression or decompression.
-l --list For each compressed file, list the following fields:
compressed size: size of the compressed file uncompressed size: size of the uncompressed file ratio: compression ratio (0.0% if unknown) uncompressed_name: name of the uncompressed file
The uncompressed size is given as -1 for files not in gzip format, such as compressed .Z files. To get the uncompressed size for such a file, you can use:
zcat file.Z | wc -c
In combination with the --verbose option, the following fields are also displayed:
method: compression method crc: the 32-bit CRC of the uncompressed data date & time: timestamp for the uncompressed file
The compression methods currently supported are deflate, compress, lzh (SCO compress -H) and pack.  The crc is given as ffffffff for a file not in gzip format.
With --name, the uncompressed name,  date and time  are those stored within the compress file if present.
With --verbose, the size totals and compression ratio for all files is also displayed, unless some sizes are unknown. With --quiet, the title and totals lines are not displayed.
-L --license Display the gzip license and quit.
-n --no-name When compressing, do not save the original file name and timestamp by default. (The original name is always saved if the name had to be truncated.) When decompressing, do not restore the original file name if present (remove only the gzip suffix from the compressed file name) and do not restore the original timestamp if present (copy it from the compressed file). This option is the default when decompressing.
-N --name When compressing, always save the original file name and timestamp; this is the default. When decompressing, restore the original file name and timestamp if present. This option is useful on systems which have a limit on file name length or when the timestamp has been lost after a file transfer.
-q --quiet Suppress all warnings.
-r --recursive Travel the directory structure recursively. If any of the file names specified on the command line are directories, gzip will descend into the directory and compress all the files it finds there (or decompress them in the case of gunzip ).
-S .suf --suffix .suf When compressing, use suffix .suf instead of .gz.  Any non-empty suffix can be given, but suffixes other than .z and .gz should be avoided to avoid confusion when files are transferred to other systems.
When decompressing, add .suf to the beginning of the list of suffixes to try, when deriving an output file name from an input file name.
--synchronous Use synchronous output.  With this option, gzip is less likely to lose data during a system crash, but it can be considerably slower.
-t --test Test. Check the compressed file integrity then quit.
-v --verbose Verbose. Display the name and percentage reduction for each file compressed or decompressed.
-V --version Version. Display the version number and compilation options then quit.
-# --fast --best Regulate the speed of compression using the specified digit #, where -1 or --fast indicates the fastest compression method (less compression) and -9 or --best indicates the slowest compression method (best compression).  The default compression level is -6 (that is, biased towards high compression at expense of speed).
--rsyncable When you synchronize a compressed file between two computers, this option allows rsync to transfer only files that were changed in the archive instead of the entire archive.  Normally, after a change is made to any file in the archive, the compression algorithm can generate a new version of the archive that does not match the previous version of the archive. In this case, rsync transfers the entire new version of the archive to the remote computer.  With this option, rsync can transfer only the changed files as well as a small amount of metadata that is required to update the archive structure in the area that was changed.
Multiple compressed files can be concatenated. In this case, gunzip will extract all members at once. For example:
gzip -c file1  > foo.gz gzip -c file2 >> foo.gz
gunzip -c foo
cat file1 file2
In case of damage to one member of a .gz file, other members can still be recovered (if the damaged member is removed). However, you can get better compression by compressing all members at once:
cat file1 file2 | gzip > foo.gz
compresses better than
gzip -c file1 file2 > foo.gz
If you want to recompress concatenated files to get better compression, do:
gzip -cd old.gz | gzip > new.gz
If a compressed file consists of several members, the uncompressed size and CRC reported by the --list option applies to the last member only. If you need the uncompressed size for all members, you can use:
gzip -cd file.gz | wc -c
If you wish to create a single archive file with multiple members so that members can later be extracted independently, use an archiver such as tar or zip. GNU tar supports the -z option to invoke gzip transparently. gzip is designed as a complement to tar, not as a replacement.
The obsolescent environment variable GZIP can hold a set of default options for gzip.  These options are interpreted first and can be overwritten by explicit command line parameters.  As this can cause problems when using scripts, this feature is supported only for options that are reasonably likely to not cause too much harm, and gzip warns if it is used.  This feature will be removed in a future release of gzip.
You can use an alias or script instead.  For example, if gzip is in the directory /usr/bin you can prepend $HOME/bin to your PATH and create an executable script $HOME/bin/gzip containing the following:
#! /bin/sh export PATH=/usr/bin exec gzip -9 "$@"
znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1), unzip(1), compress(1)
The gzip file format is specified in P. Deutsch, GZIP file format specification version 4.3, <https://www.ietf.org/rfc/rfc1952.txt>, Internet RFC 1952 (May 1996).  The zip deflation format is specified in P. Deutsch, DEFLATE Compressed Data Format Specification version 1.3, <https://www.ietf.org/rfc/rfc1951.txt>, Internet RFC 1951 (May 1996).
Exit status is normally 0; if an error occurs, exit status is 1. If a warning occurs, exit status is 2.
Usage: gzip [-cdfhklLnNrtvV19] [-S suffix] [file ...] Invalid options were specified on the command line.
file: not in gzip format The file specified to gunzip has not been compressed.
file: Corrupt input. Use zcat to recover some data. The compressed file has been damaged. The data up to the point of failure can be recovered using
zcat file > recover
file: compressed with xx bits, can only handle yy bits File was compressed (using LZW) by a program that could deal with more bits than the decompress code on this machine.  Recompress the file with gzip, which compresses better and uses less memory.
file: already has .gz suffix -- unchanged The file is assumed to be already compressed.  Rename the file and try again.
file already exists; do you wish to overwrite (y or n)? Respond "y" if you want the output file to be replaced; "n" if not.
gunzip: corrupt input A SIGSEGV violation was detected which usually means that the input file has been corrupted.
xx.x% Percentage of the input saved by compression. (Relevant only for -v and -l.)
-- not a regular file or directory: ignored When the input file is not a regular file or directory, (e.g. a symbolic link, socket, FIFO, device file), it is left unaltered.
-- has xx other links: unchanged The input file has links; it is left unchanged.  See ln(1) for more information. Use the -f flag to force compression of multiply-linked files.
When writing compressed data to a tape, it is generally necessary to pad the output with zeroes up to a block boundary. When the data is read and the whole block is passed to gunzip for decompression, gunzip detects that there is extra trailing garbage after the compressed data and emits a warning by default.  You can use the --quiet option to suppress the warning.
The gzip format represents the input size modulo 2^32, so the --list option reports incorrect uncompressed sizes and compression ratios for uncompressed files 4 GB and larger.  To work around this problem, you can use the following command to discover a large uncompressed file's true size:
zcat file.gz | wc -c
The --list option reports sizes as -1 and crc as ffffffff if the compressed file is on a non seekable media.
In some rare cases, the --best option gives worse compression than the default compression level (-6). On some highly redundant files, compress compresses better than gzip.
Report bugs to: bug-gzip@gnu.org GNU gzip home page: <https://www.gnu.org/software/gzip/> General help using GNU software: <https://www.gnu.org/gethelp/>
Copyright © 1998-1999, 2001-2002, 2012, 2015-2021 Free Software Foundation, Inc. Copyright © 1992, 1993 Jean-loup Gailly
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.
GS(1)                              Ghostscript                             GS(1)
gs - Ghostscript (PostScript and PDF language interpreter and previewer)
gs [ options ] [ files ] ... (Unix, VMS) gswin32c [ options ] [ files ] ... (MS Windows) gswin32 [ options ] [ files ] ... (MS Windows 3.1) gsos2 [ options ] [ files ] ... (OS/2)
The gs (gswin32c, gswin32, gsos2) command invokes Ghostscript, an interpreter of Adobe Systems' PostScript(tm) and Portable Document Format (PDF) languages.  gs reads "files" in sequence and executes them as Ghostscript programs. After doing this, it reads further input from the standard input stream (normally the keyboard), interpreting each line separately and output to an output device (may be a file or an X11 window preview, see below). The interpreter exits gracefully when it encounters the "quit" command (either in a file or from the keyboard), at end-of- file, or at an interrupt signal (such as Control-C at the keyboard).
The interpreter recognizes many option switches, some of which are described below. Please see the usage documentation for complete information. Switches may appear anywhere in the command line and apply to all files thereafter.  Invoking Ghostscript with the -h or -? switch produces a message which shows several useful switches, all the devices known to that executable, and the search path for fonts; on Unix it also shows the location of detailed documentation.
Ghostscript may be built to use many different output devices.  To see which devices your executable includes, run "gs -h".
Unless you specify a particular device, Ghostscript normally opens the first one of those and directs output to it.
If built with X11 support, often the default device is an X11 window (previewer), else ghostscript will typically use the bbox device and print on stdout the dimension of the postscript file.
So if the first one in the list is the one you want to use, just issue the command
gs myfile.ps
You can also check the set of available devices from within Ghostscript: invoke Ghostscript and type
devicenames ==
but the first device on the resulting list may not be the default device you determine with "gs -h".  To specify "AbcXyz" as the initial output device, include the switch
-sDEVICE=AbcXyz
For example, for output to an Epson printer you might use the command
gs -sDEVICE=epson myfile.ps
The "-sDEVICE=" switch must precede the first mention of a file to print, and only the switch's first use has any effect.
Finally, you can specify a default device in the environment variable GS_DEVICE.  The order of precedence for these alternatives from highest to lowest (Ghostscript uses the device defined highest in the list) is:
Some devices can support different resolutions (densities).  To specify the resolution on such a printer, use the "-r" switch:
gs -sDEVICE=<device> -r<xres>x<yres>
For example, on a 9-pin Epson-compatible printer, you get the lowest- density (fastest) mode with
gs -sDEVICE=epson -r60x72
and the highest-density (best output quality) mode with
gs -sDEVICE=epson -r240x72.
If you select a printer as the output device, Ghostscript also allows you to choose where Ghostscript sends the output -- on Unix systems, usually to a temporary file.  To send the output to a file "foo.xyz", use the switch
-sOutputFile=foo.xyz
You might want to print each page separately.  To do this, send the output to a series of files "foo1.xyz, foo2.xyz, ..." using the "-sOutputFile=" switch with "%d" in a filename template:
-sOutputFile=foo%d.xyz
Each resulting file receives one page of output, and the files are numbered in sequence.  "%d" is a printf format specification; you can also use a variant like "%02d".
On Unix and MS Windows systems you can also send output to a pipe.  For example, to pipe output to the "lpr" command (which, on many Unix systems, directs it to a printer), use the option
-sOutputFile=%pipe%lpr
Note that the '%' characters need to be doubled on MS Windows to avoid mangling by the command interpreter.
You can also send output to standard output:
-sOutputFile=- or -sOutputFile=%stdout%
In this case you must also use the -q switch, to prevent Ghostscript from writing messages to standard output.
To select a specific paper size, use the command line switch
-sPAPERSIZE=<paper_size>
-sPAPERSIZE=a4 or -sPAPERSIZE=legal
Most ISO and US paper sizes are recognized. See the usage documentation for a full list, or the definitions in the initialization file "gs_statd.ps".
Ghostscript can do many things other than print or view PostScript and PDF files.  For example, if you want to know the bounding box of a PostScript (or EPS) file, Ghostscript provides a special "device" that just prints out this information.
For example, using one of the example files distributed with Ghostscript,
gs -sDEVICE=bbox golfer.ps
%%BoundingBox: 0 25 583 732 %%HiResBoundingBox: 0.808497 25.009496 582.994503 731.809445
-- filename arg1 ... Takes the next argument as a file name as usual, but takes all remaining arguments (even if they have the syntactic form of switches) and defines the name "ARGUMENTS" in "userdict" (not "systemdict") as an array of those strings, before running the file.  When Ghostscript finishes executing the file, it exits back to the shell.
-Dname=token -dname=token Define a name in "systemdict" with the given definition.  The token must be exactly one token (as defined by the "token" operator) and may contain no whitespace.
-Dname -dname Define a name in "systemdict" with value=null.
-Sname=string -sname=string Define a name in "systemdict" with a given string as value.  This is different from -d.  For example, -dname=35 is equivalent to the program fragment /name 35 def whereas -sname=35 is equivalent to /name (35) def
-P     Makes Ghostscript to look first in the current directory for library files.  By default, Ghostscript no longer looks in the current directory, unless, of course, the first explicitly supplied directory is "." in -I.  See also the INITIALIZATION FILES section below, and bundled Use.htm for detailed discussion on search paths and how Ghostcript finds files.
-q     Quiet startup: suppress normal startup messages, and also do the equivalent of -dQUIET.
-gnumber1xnumber2 Equivalent to -dDEVICEWIDTH=number1 and -dDEVICEHEIGHT=number2. This is for the benefit of devices (such as X11 windows) that require (or allow) width and height to be specified.
-rnumber -rnumber1xnumber2 Equivalent to -dDEVICEXRESOLUTION=number1 and -dDEVICEYRESOLUTION=number2.  This is for the benefit of devices such as printers that support multiple X and Y resolutions.  If only one number is given, it is used for both X and Y resolutions.
-Idirectories Adds the designated list of directories at the head of the search path for library files.
-      This is not really a switch, but indicates to Ghostscript that standard input is coming from a file or a pipe and not interactively from the command line.  Ghostscript reads from standard input until it reaches end-of-file, executing it like any other file, and then continues with processing the command line. When the command line has been entirely processed, Ghostscript exits rather than going into its interactive mode.
Note that the normal initialization file "gs_init.ps" makes "systemdict" read-only, so the values of names defined with -D, -d, -S, or -s cannot be changed (although, of course, they can be superseded by definitions in "userdict" or other dictionaries.)
-dNOCACHE Disables character caching.  Useful only for debugging.
-dNOBIND Disables the "bind" operator.  Useful only for debugging.
-dNODISPLAY Suppresses the normal initialization of the output device.  This may be useful when debugging.
-dNOPAUSE Disables the prompt and pause at the end of each page.  This may be desirable for applications where another program is driving Ghostscript.
-dNOPLATFONTS Disables the use of fonts supplied by the underlying platform (for instance X Windows). This may be needed if the platform fonts look undesirably different from the scalable fonts.
-dSAFER Restricts file operations the job can perform. Now the default mode of operation.
-dWRITESYSTEMDICT Leaves "systemdict" writable.  This is necessary when running special utility programs, but is strongly discouraged as it bypasses normal Postscript security measures.
-sDEVICE=device Selects an alternate initial output device, as described above.
-sOutputFile=filename Selects an alternate output file (or pipe) for the initial output device, as described above.
The -dSAFER option restricts file system accesses to those files and directories allowed by the relevant environment variables (such as GS_LIB) or by the command line parameters (see https://ghostscript.com/doc/current/Use.htm for details).
SAFER mode is now the default mode of operation. Thus when running programs that need to open files or set restricted parameters you should pass the -dNOSAFER command line option or its synonym -dDELAYSAFER.
Running with NOSAFER/DELAYSAFER (as the same suggests) loosens the security and is thus recommended ONLY for debugging or in VERY controlled workflows, and strongly NOT recommended in any other circumstances.
The locations of many Ghostscript run-time files are compiled into the executable when it is built.  On Unix these are typically based in /usr/local, but this may be different on your system.  Under DOS they are typically based in C:\GS, but may be elsewhere, especially if you install Ghostscript with GSview.  Run "gs -h" to find the location of Ghostscript documentation on your system, from which you can get more details.
/usr/local/share/ghostscript/#.##/* Startup files, utilities, and basic font definitions
/usr/local/share/ghostscript/fonts/* More font definitions
/usr/local/share/ghostscript/#.##/examples/* Ghostscript demonstration files
/usr/local/share/ghostscript/#.##/doc/* Diverse document files
When looking for the initialization files "gs_*.ps", the files related to fonts, or the file for the "run" operator, Ghostscript first tries to open the file with the name as given, using the current working directory if no directory is specified.  If this fails, and the file name doesn't specify an explicit directory or drive (for instance, doesn't contain "/" on Unix systems or "\" on MS Windows systems), Ghostscript tries directories in this order:
1.  the directories specified by the -I switches in the command line (see below), if any;
2.  the directories specified by the GS_LIB environment variable, if any;
3.  the directories specified by the GS_LIB_DEFAULT macro in the Ghostscript makefile when the executable was built.  When gs is built on Unix, GS_LIB_DEFAULT is usually "/usr/local/share/ghostscript/#.##:/usr/local/share/ghostscript/fonts" where "#.##" represents the Ghostscript version number.
Each of these (GS_LIB_DEFAULT, GS_LIB, and -I parameter) may be either a single directory or a list of directories separated by ":".
GS_OPTIONS String of options to be processed before the command line options
GS_DEVICE Used to specify an output device
GS_FONTPATH Path names used to search for fonts
GS_LIB Path names for initialization files and fonts
TEMP   Where temporary files are made
Ghostscript, or more properly the X11 display device, looks for the following resources under the program name "Ghostscript":
borderWidth The border width in pixels (default = 1).
borderColor The name of the border color (default = black).
geometry The window size and placement, WxH+X+Y (default is NULL).
xResolution The number of x pixels per inch (default is computed from WidthOfScreen and WidthMMOfScreen).
yResolution The number of y pixels per inch (default is computed from HeightOfScreen and HeightMMOfScreen).
useBackingPixmap Determines whether backing store is to be used for saving display window (default = true).
See the usage document for a more complete list of resources.  To set these resources on Unix, put them in a file such as "~/.Xresources" in the following form:
Ghostscript*geometry:     612x792-0+0 Ghostscript*xResolution: 72 Ghostscript*yResolution: 72
Then merge these resources into the X server's resource database:
% xrdb -merge ~/.Xresources
The various Ghostscript document files (above), especially Use.htm.
See http://bugs.ghostscript.com/ and the Usenet news group comp.lang.postscript.
This document was last revised for Ghostscript version 9.55.0.
Artifex Software, Inc. are the primary maintainers of Ghostscript. Russell J. Lang, gsview at ghostgum.com.au, is the author of most of the MS Windows code in Ghostscript.
NPM-DOCS(1)                                                          NPM-DOCS(1)
npm-docs -- Docs for a package in a web browser maybe
npm docs <pkgname> npm home <pkgname>
This command tries to guess at the likely location of a package´s documentation URL, and then tries to open it using the --browser config param.
browser •   Default: OS X: "open", others: "google-chrome"
•   Type: String
The browser that is called by the npm docs command to open websites.
registry •   Default: https://registry.npmjs.org/
•   Type: url
The base URL of the npm package registry.
•   npm help view
•   npm help publish
•   npm help registry
•   npm help config
•   npm help json
STRINGS(1P)                 POSIX Programmer's Manual                STRINGS(1P)
strings — find printable strings in files
strings [-a] [-t format] [-n number] [file...]
The strings utility shall look for printable strings in regular files and shall write those strings to standard output. A printable string is any sequence of four (by default) or more printable characters terminated by a <newline> or NUL character. Additional implementation-defined strings may be written; see localedef.
If the first argument is '-', the results are unspecified.
The strings utility shall conform to the Base Definitions volume of POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines, except for the unspecified usage of '-'.
-a        Scan files in their entirety. If -a is not specified, it is implementation-defined what portion of each file is scanned for strings.
-n number Specify the minimum string length, where the number argument is a positive decimal integer. The default shall be 4.
-t format Write each string preceded by its byte offset from the start of the file. The format shall be dependent on the single character used as the format option-argument:
d     The offset shall be written in decimal.
o     The offset shall be written in octal.
x     The offset shall be written in hexadecimal.
file      A pathname of a regular file to be used as input. If no file operand is specified, the strings utility shall read from the standard input.
See the INPUT FILES section.
The input files named by the utility arguments or the standard input shall be regular files of any format.
The following environment variables shall affect the execution of strings:
LC_CTYPE  Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments and input files) and to identify printable strings.
Strings found shall be written to the standard output, one per line.
When the -t option is not specified, the format of the output shall be:
"%s", <string>
With the -t o option, the format of the output shall be:
"%o %s", <byte offset>, <string>
With the -t x option, the format of the output shall be:
"%x %s", <byte offset>, <string>
With the -t d option, the format of the output shall be:
"%d %s", <byte offset>, <string>
By default the data area (as opposed to the text, ``bss'', or header areas) of a binary executable file is scanned. Implementations document which areas are scanned.
Some historical implementations do not require NUL or <newline> terminators for strings to permit those languages that do not use NUL as a string terminator to have their strings written.
Apart from rationalizing the option syntax and slight difficulties with object and executable binary files, strings is specified to match historical practice closely. The -a and -n options were introduced to replace the non-conforming - and -number options. These options are no longer specified by POSIX.1‐2008 but may be present in some implementations.
The -o option historically means different things on different implementations. Some use it to mean ``offset in decimal'', while others use it as ``offset in octal''. Instead of trying to decide which way would be least objectionable, the -t option was added. It was originally named -O to mean ``offset'', but was changed to -t to be consistent with od.
The ISO C standard function isprint() is restricted to a domain of unsigned char.  This volume of POSIX.1‐2017 requires implementations to write strings as defined by the current locale.
localedef, nm
MODULE(1)                            Modules                           MODULE(1)
module - command interface to the Modules package
module [switches] [sub-command [sub-command-args]]
module is a user interface to the Modules package. The Modules package provides for the dynamic modification of the user's environment via modulefiles.
Each modulefile contains the information needed to configure the shell for an application. Once the Modules package is initialized, the environment can be modified on a per-module basis using the module command which interprets modulefiles. Typically modulefiles instruct the module command to alter or set shell environment variables such as PATH, MANPATH, etc. Modulefiles may be shared by many users on a system and users may have their own set to supplement or replace the shared modulefiles.
The modulefiles are added to and removed from the current environment by the user. The environment changes contained in a modulefile can be summarized through the module command as well. If no arguments are given, a summary of the module usage and sub-commands are shown.
The action for the module command to take is described by the sub-command and its associated arguments.
Package Initialization The Modules package and the module command are initialized when a shell-specific initialization script is sourced into the shell. The script executes the autoinit sub-command of the modulecmd.tcl program located in /usr/lib/x86_64-linux-gnu for the corresponding shell. The output of this execution is evaluated by shell which creates the module command as either an alias or function and creates Modules environment variables.
During this initialization process, if the Modules environment is found undefined (when both MODULEPATH and LOADEDMODULES are found either unset or empty), the modulespath and initrc configuration files located in /etc/environment-modules are evaluated if present and following this order. modulespath file contains the list of modulepaths to enable during initialization. In this file, the modulepaths are separated by newline or colon characters. initrc is a modulefile that defines during initialization the modulepaths to enable, the modules to load and the module configuration to apply.
During the initialization process, if the Modules environment is found defined a module refresh is automatically applied to restore in the current environment all non-persistent components set by loaded modules.
The module alias or function executes the modulecmd.tcl program and has the shell evaluate the command's output. The first argument to modulecmd.tcl specifies the type of shell.
The initialization scripts are kept in /usr/share/modules/init/<shell> where <shell> is the name of the sourcing shell. For example, a C Shell user sources the /usr/share/modules/init/csh script. The sh, csh, tcsh, bash, ksh, zsh and fish shells are supported by modulecmd.tcl. In addition, python, perl, ruby, tcl, cmake, r and lisp "shells" are supported which writes the environment changes to stdout as python, perl, ruby, tcl, lisp, r or cmake code.
Initialization may also be performed by directly calling the autoinit sub-command of the modulecmd.tcl program.
A ml alias or function may also be defined at initialization time if enabled (see MODULES_ML section). ml is a handy frontend leveraging all module command capabilities with less character typed. See ml(1) for detailed information.
Examples of initialization C Shell initialization (and derivatives):
source /usr/share/modules/init/csh module load modulefile modulefile ...
Bourne Shell (sh) (and derivatives):
. /usr/share/modules/init/sh module load modulefile modulefile ...
Perl:
require "/usr/share/modules/init/perl.pm"; &module('load', 'modulefile', 'modulefile', '...');
Python:
import os exec(open('/usr/share/modules/init/python.py').read()) module('load', 'modulefile', 'modulefile', '...')
Bourne Shell (sh) (and derivatives) with autoinit sub-command:
eval "`/usr/lib/x86_64-linux-gnu/modulecmd.tcl sh autoinit`"
Modulecmd startup Upon invocation modulecmd.tcl sources a site-specific configuration script if it exists. The location for this script is /etc/environment- modules/siteconfig.tcl. An additional siteconfig script may be specified with the MODULES_SITECONFIG environment variable, if allowed by modulecmd.tcl configuration, and will be loaded if it exists after /etc/environment-modules/siteconfig.tcl. Siteconfig is a Tcl script that enables to supersede any global variable or procedure definition of modulecmd.tcl.
Afterward, modulecmd.tcl sources rc files which contain global, user and modulefile specific setups. These files are interpreted as modulefiles. See modulefile(4) for detailed information.
Upon invocation of modulecmd.tcl module run-command files are sourced in the following order:
1. Global RC file as specified by MODULERCFILE variable or /etc/environment-modules/rc. If MODULERCFILE points to a directory, the modulerc file in this directory is used as global RC file.
2. User specific module RC file $HOME/.modulerc
3. All .modulerc and .version files found during modulefile seeking.
These module run-command files must begins like modulefiles with the magic cookie #%Module. A version number may be placed after this string. The version number reflects the minimum version of modulecmd.tcl required to interpret the run-command file. If a version number doesn't exist, then modulecmd.tcl will assume the run-command file is compatible. Files without the magic cookie or with a version number greater than the current version of modulecmd.tcl will not be interpreted and an error is reported. Such error does not abort the whole module evaluation. If the mcookie_version_check configuration is disabled the version number set is not checked.
Command line switches The module command accepts command line switches as its first parameter. These may be used to control output format of all information displayed and the module behavior in case of locating and interpreting modulefiles.
All switches may be entered either in short or long notation. The following switches are accepted:
--all, -a Include hidden modules in search performed with avail, aliases, list, search or whatis sub-commands. Hard-hidden modules are not affected by this option.
--auto On load, unload and switch sub-commands, enable automated module handling mode. See also MODULES_AUTO_HANDLING section.
--color=<WHEN> Colorize the output. WHEN defaults to always or can be never or auto. See also MODULES_COLOR section.
--contains, -C On avail sub-command, return modules whose fully qualified name contains search query string.
--debug, -D, -DD Debug mode. Causes module to print debugging messages about its progress. Multiple -D options increase the debug verbosity.  The maximum is 2.
--default, -d On avail sub-command, display only the default version of each module name. Default version is the explicitly set default version or also the implicit default version if the configuration option implicit_default is enabled (see Locating Modulefiles section in the modulefile(4) man page for further details on implicit default version).
--force, -f On load, unload and switch sub-commands, by-pass any unsatisfied modulefile constraint corresponding to the declared prereq and conflict. Which means for instance that a modulefile will be loaded even if it comes in conflict with another loaded modulefile or that a modulefile will be unloaded even if it is required as a prereq by another modulefile.
On clear sub-command, skip the confirmation dialog and proceed.
--help, -h Give some helpful usage information, and terminates the command.
--icase, -i Match module specification arguments in a case insensitive manner.
--indepth On avail sub-command, include in search results the matching modulefiles and directories and recursively the modulefiles and directories contained in these matching directories.
--json, -j Display avail, list, savelist, whatis and search output in JSON format.
--latest, -L On avail sub-command, display only the highest numerically sorted version of each module name (see Locating Modulefiles section in the modulefile(4) man page).
--long, -l Display avail, list and savelist output in long format.
--no-auto On load, unload and switch sub-commands, disable automated module handling mode. See also MODULES_AUTO_HANDLING section.
--no-indepth On avail sub-command, limit search results to the matching modulefiles and directories found at the depth level expressed by the search query. Thus modulefiles contained in directories part of the result are excluded.
--no-pager Do not pipe message output into a pager.
--output=LIST, -o LIST Define the content to report in addition to module names. This option is supported by avail and list sub-commands on their regular or terse output modes. Accepted values are a LIST of elements to report separated by colon character (:). The order of the elements in LIST does not matter.
Accepted elements in LIST for avail sub-command are: modulepath, alias, dirwsym, sym, tag and key.
Accepted elements in LIST for list sub-command are: header, idx, variant, sym, tag and key.
The order of the elements in LIST does not matter. Module names are the only content reported when LIST is set to an empty value.
See also MODULES_AVAIL_OUTPUT and MODULES_LIST_OUTPUT.
--paginate Pipe all message output into less (or if set, to the command referred in MODULES_PAGER variable) if error output stream is a terminal. See also MODULES_PAGER section.
--silent, -s Turn off error, warning and informational messages. module command output result is not affected by silent mode.
--starts-with, -S On avail sub-command, return modules whose name starts with search query string.
--terse, -t Display avail, list and savelist output in short format.
--trace, -T Trace mode. Report details on module searches, resolutions, selections and evaluations in addition to printing verbose messages.
--verbose, -v, -vv Enable verbose messages during module command execution. Multiple -v options increase the verbosity level. The maximum is 2.
--version, -V Lists the current version of the module command. The command then terminates without further processing.
--width=COLS, -w COLS Set the width of the output to COLS columns. See also MODULES_TERM_WIDTH section.
Module Sub-Commands add [--auto|--no-auto] [-f] modulefile... See load.
aliases [-a] List all available symbolic version-names and aliases in the current MODULEPATH.  All directories in the MODULEPATH are recursively searched in the same manner than for the avail sub-command. Only the symbolic version-names and aliases found in the search are displayed.
append-path [-d C|--delim C|--delim=C] [--duplicates] variable value... Append value to environment variable. The variable is a colon, or delimiter, separated list. See append-path in the modulefile(4) man page for further explanation.
When append-path is called as a module sub-command, the reference counter variable, which denotes the number of times value has been added to environment variable, is not updated unless if the --duplicates option is set.
apropos [-a] [-j] string See search.
avail [-d|-L] [-t|-l|-j] [-a] [-o LIST] [-S|-C] [--indepth|--no-indepth] [path...] List all available modulefiles in the current MODULEPATH. All directories in the MODULEPATH are recursively searched for files containing the modulefile magic cookie. If an argument is given, then each directory in the MODULEPATH is searched for modulefiles whose pathname, symbolic version-name or alias match the argument. Argument may contain wildcard characters. Multiple versions of an application can be supported by creating a subdirectory for the application containing modulefiles for each version.
Symbolic version-names and aliases found in the search are displayed in the result of this sub-command. Symbolic version-names are displayed next to the modulefile they are assigned to within parenthesis. Aliases are listed in the MODULEPATH section where they have been defined. To distinguish aliases from modulefiles a @ symbol is added within parenthesis next to their name. Aliases defined through a global or user specific module RC file are listed under the global/user modulerc section.
When colored output is enabled and a specific graphical rendition is defined for module default version, the default symbol is omitted and instead the defined graphical rendition is applied to the relative modulefile. When colored output is enabled and a specific graphical rendition is defined for module alias, the @ symbol is omitted. The defined graphical rendition applies to the module alias name. See MODULES_COLOR and MODULES_COLORS sections for details on colored output.
Module tags applying to the available modulefiles returned by the avail sub-command are reported along the module name they are associated to (see Module tags section).
A Key section is added at the end of the output in case some elements are reported in parentheses or chevrons along module name or if some graphical rendition is made over some outputed elements. This Key section gives hints on the meaning of such elements.
The parameter path may also refer to a symbolic modulefile name or a modulefile alias. It may also leverage a specific syntax to finely select module version (see Advanced module version specifiers section below).
clear [-f] Force the Modules package to believe that no modules are currently loaded. A confirmation is requested if command-line switch -f (or --force) is not passed. Typed confirmation should equal to yes or y in order to proceed.
config [--dump-state|name [value]|--reset name] Gets or sets modulecmd.tcl options. Reports the currently set value of passed option name or all existing options if no name passed. If a name and a value are provided, the value of option name is set to value. If command-line switch --reset is passed in addition to a name, overridden value for option name is cleared.
When a reported option value differs from default value a mention is added to indicate whether the overridden value is coming from a command-line switch (cmd-line) or from an environment variable (env-var). When a reported option value is locked and cannot be altered a (locked) mention is added.
If no value is currently set for an option name, the mention <undef> is reported.
When command-line switch --dump-state is passed, current modulecmd.tcl state and Modules-related environment variables are reported in addition to currently set modulecmd.tcl options.
Existing option names are:
advanced_version_spec Advanced module version specification to finely select modulefiles. Defines environment variable MODULES_ADVANCED_VERSION_SPEC when set.
auto_handling Automated module handling mode. Defines MODULES_AUTO_HANDLING.
avail_indepth avail sub-command in depth search mode. Defines MODULES_AVAIL_INDEPTH.
avail_output Content to report in addition to module names on avail sub-command regular output mode. Defines MODULES_AVAIL_OUTPUT.
avail_terse_output Content to report in addition to module names on avail sub-command terse output mode. Defines MODULES_AVAIL_TERSE_OUTPUT.
collection_pin_version Register exact modulefile version in collection. Defines MODULES_COLLECTION_PIN_VERSION.
collection_target Collection target which is valid for current system. Defines MODULES_COLLECTION_TARGET.
color  Colored output mode. Defines MODULES_COLOR.
colors Chosen colors to highlight output items. Defines MODULES_COLORS.
contact Modulefile contact address. Defines MODULECONTACT.
extended_default Allow partial module version specification. Defines MODULES_EXTENDED_DEFAULT.
editor Text editor command to open modulefile with through edit sub-command. Defines MODULES_EDITOR.
extra_siteconfig Additional site-specific configuration script location. Defines MODULES_SITECONFIG.
home   Location of Modules package main directory. Defines MODULESHOME.
icase  Enable case insensitive match. Defines MODULES_ICASE.
ignored_dirs Directories ignored when looking for modulefiles.
The value of this option cannot be altered.
implicit_default Set an implicit default version for modules. Defines MODULES_IMPLICIT_DEFAULT.
implicit_requirement Implicitly define a requirement onto modules specified on module commands in modulefile. Defines MODULES_IMPLICIT_REQUIREMENT.
list_output Content to report in addition to module names on list sub-command regular output mode. Defines MODULES_LIST_OUTPUT.
list_terse_output Content to report in addition to module names on list sub-command terse output mode. Defines MODULES_LIST_TERSE_OUTPUT.
locked_configs Configuration options that cannot be superseded. All options referred in locked_configs value are locked, thus their value cannot be altered.
mcookie_version_check Defines if the version set in the Modules magic cookie used in modulefile should be checked against the version of modulecmd.tcl to determine if the modulefile could be evaluated or not. Defines MODULES_MCOOKIE_VERSION_CHECK.
ml     Define ml command at initialization time. Defines MODULES_ML.
nearly_forbidden_days Set the number of days a module should be considered nearly forbidden prior reaching its expiry date. Defines MODULES_NEARLY_FORBIDDEN_DAYS.
pager  Text viewer to paginate message output. Defines MODULES_PAGER.
quarantine_support Defines if code for quarantine mechanism support should be generated in module shell function definition. Defines MODULES_QUARANTINE_SUPPORT.
rcfile Global run-command file location. Defines MODULERCFILE.
run_quarantine Environment variables to indirectly pass to modulecmd.tcl. Defines MODULES_RUN_QUARANTINE.
silent_shell_debug Disablement of shell debugging property for the module command. Also defines if code to silence shell debugging property should be generated in module shell function definition. Defines MODULES_SILENT_SHELL_DEBUG.
search_match Module search match style. Defines MODULES_SEARCH_MATCH.
set_shell_startup Ensure module command definition by setting shell startup file. Defines MODULES_SET_SHELL_STARTUP.
shells_with_ksh_fpath Ensure module command is defined in ksh when it is started as a sub-shell from the listed shells. Defines MODULES_SHELLS_WITH_KSH_FPATH.
siteconfig Primary site-specific configuration script location.
tag_abbrev Abbreviations to use to report module tags. Defines MODULES_TAG_ABBREV.
tag_color_name Tags whose name should be colored instead of module name. Defines MODULES_TAG_COLOR_NAME.
tcl_ext_lib Modules Tcl extension library location.
term_background Terminal background color kind. Defines MODULES_TERM_BACKGROUND.
term_width Set the width of the output. Defines MODULES_TERM_WIDTH.
unload_match_order Unload firstly loaded or lastly loaded module matching request. Defines MODULES_UNLOAD_MATCH_ORDER.
variant_shortcut Shortcut characters that could be used to specify or report module variants.  Defines MODULES_VARIANT_SHORTCUT.
verbosity Module command verbosity level. Defines MODULES_VERBOSITY.
wa_277 Workaround for Tcsh history issue. Defines MODULES_WA_277.
display modulefile... Display information about one or more modulefiles. The display sub-command will list the full path of the modulefile and the environment changes the modulefile will make if loaded. (Note: It will not display any environment changes found within conditional statements.)
The parameter modulefile may also be a symbolic modulefile name or a modulefile alias. It may also leverage a specific syntax to finely select module version (see Advanced module version specifiers section below).
edit modulefile Open modulefile for edition with text editor command designated by the editor configuration option.
help [modulefile...] Print the usage of each sub-command. If an argument is given, print the Module-specific help information for the modulefile.
info-loaded modulefile Returns the names of currently loaded modules matching passed modulefile.  Returns an empty string if passed modulefile does not match any loaded modules. See module-info loaded in the modulefile(4) man page for further explanation.
initadd modulefile... Add modulefile to the shell's initialization file in the user's home directory. The startup files checked (in order) are:
C Shell .modules, .cshrc, .csh_variables and .login
TENEX C Shell .modules, .tcshrc, .cshrc, .csh_variables and .login
Bourne and Korn Shells .modules, .profile
GNU Bourne Again Shell .modules, .bash_profile, .bash_login, .profile and .bashrc
Z Shell .modules, .zshrc, .zshenv and .zlogin
Friendly Interactive Shell .modules, .config/fish/config.fish