OS Manuals

/usr/bin/minify

Go minifiers for web formats

From minify-fips 2.24.25-r0 (enterprise-packages), captured 2026-11-08 by running minify --help (exit 0). permalink

Usage: minify [options] inputs...

Options:
  -a, --all                   Minify all files, including hidden files and files in hidden directories
  -b, --bundle                Bundle files by concatenation into a single file
      --css-precision int     Number of significant digits to preserve in numbers, 0 is all
      --css-version int       CSS version to toggle supported optimizations (e.g. 2), by default 0 is the latest version
      --exclude []string      Path exclusion pattern, excludes paths from being processed
      --ext map[string]string Filename extension mapping to filetype (eg. css or text/css)
  -h, --help                  Help
      --html-keep-comments    Preserve all comments
      --html-keep-conditional-comments
                              Preserve all IE conditional comments (DEPRECATED)
      --html-keep-default-attrvals
                              Preserve default attribute values
      --html-keep-document-tags
                              Preserve html, head and body tags
      --html-keep-end-tags    Preserve all end tags
      --html-keep-quotes      Preserve quotes around attribute values
      --html-keep-special-comments
                              Preserve all IE conditionals and SSI tags
      --html-keep-whitespace  Preserve whitespace characters but still collapse multiple into one
  -i, --inplace               Minify input files in-place instead of setting output
      --include []string      Path inclusion pattern, includes paths previously excluded
      --js-keep-var-names     Preserve original variable names
      --js-precision int      Number of significant digits to preserve in numbers, 0 is all
      --js-version int        ECMAScript version to toggle supported optimizations (e.g. 2019, 2020), by default 0 is the latest version
      --json-keep-numbers     Preserve original numbers instead of minifying them
      --json-precision int    Number of significant digits to preserve in numbers, 0 is all
  -l, --list                  List all accepted filetypes
      --match []string        Filename matching pattern, only matching filenames are processed
      --mime string           Mimetype (eg. text/css), optional for input filenames (DEPRECATED, use --type)
  -o, --output string         Output file or directory, leave blank to use stdout
  -p, --preserve='[mode ownership timestamps]' []string
                              Preserve options (mode, ownership, timestamps, links, all)
  -q, --quiet                 Quiet mode to suppress all output
  -r, --recursive             Recursively minify directories
  -s, --sync                  Copy all files to destination directory and minify when filetype matches
      --svg-keep-comments     Preserve all comments
      --svg-keep-namespaces []string
                              Namespaces to keep, besides xlink
      --svg-precision int     Number of significant digits to preserve in numbers, 0 is all
      --type string           Filetype (eg. css or text/css), optional when specifying inputs
      --url string            URL of file to enable URL minification
  -v, --verbose int           Verbose mode, set twice for more verbosity
      --version               Version
  -w, --watch                 Watch files and minify upon changes
      --xml-keep-whitespace   Preserve whitespace characters but still collapse multiple into one

Arguments:
  inputs    Input files or directories, leave blank to use stdin
Options (37)
OptionDescriptionSource
-a, --allMinify all files, including hidden files and files in hidden directorieshelp
-b, --bundleBundle files by concatenation into a single filehelp
--css-precision intNumber of significant digits to preserve in numbers, 0 is allhelp
--css-version intCSS version to toggle supported optimizations (e.g. 2), by default 0 is the latest versionhelp
--exclude stringPath exclusion pattern, excludes paths from being processedhelp
-h, --helpHelphelp
--html-keep-commentsPreserve all commentshelp
--html-keep-conditional-commentsPreserve all IE conditional comments (DEPRECATED)help
--html-keep-default-attrvalsPreserve default attribute valueshelp
--html-keep-document-tagsPreserve html, head and body tagshelp
--html-keep-end-tagsPreserve all end tagshelp
--html-keep-quotesPreserve quotes around attribute valueshelp
--html-keep-special-commentsPreserve all IE conditionals and SSI tagshelp
--html-keep-whitespacePreserve whitespace characters but still collapse multiple into onehelp
-i, --inplaceMinify input files in-place instead of setting outputhelp
--include stringPath inclusion pattern, includes paths previously excludedhelp
--js-keep-var-namesPreserve original variable nameshelp
--js-precision intNumber of significant digits to preserve in numbers, 0 is allhelp
--js-version intECMAScript version to toggle supported optimizations (e.g. 2019, 2020), by default 0 is the latest versionhelp
--json-keep-numbersPreserve original numbers instead of minifying themhelp
--json-precision intNumber of significant digits to preserve in numbers, 0 is allhelp
-l, --listList all accepted filetypeshelp
--match stringFilename matching pattern, only matching filenames are processedhelp
--mime stringMimetype (eg.help
-o, --output stringOutput file or directory, leave blank to use stdouthelp
-q, --quietQuiet mode to suppress all outputhelp
-r, --recursiveRecursively minify directorieshelp
-s, --syncCopy all files to destination directory and minify when filetype matcheshelp
--svg-keep-commentsPreserve all commentshelp
--svg-keep-namespaces stringNamespaces to keep, besides xlinkhelp
--svg-precision intNumber of significant digits to preserve in numbers, 0 is allhelp
--type stringFiletype (eg.help
--url stringURL of file to enable URL minificationhelp
-v, --verbose intVerbose mode, set twice for more verbosityhelp
--versionVersionhelp
-w, --watchWatch files and minify upon changeshelp
--xml-keep-whitespacePreserve whitespace characters but still collapse multiple into onehelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.