The syntax of the stow command is:
stow [options] [action flag] package ...
Each package is the name of a package (e.g., ‘perl’) in the stow directory that we wish to install into (or delete from) the target directory. The default action is to install the given packages, although alternate actions may be specified by preceding the package name(s) with an action flag.
The following options are supported:
--ignore='*.orig' --ignore='*.dist'
will cause stow to ignore files ending in .orig or .dist.
Note that the regular expression is anchored to the end of the filename, because this is what you will want to do most of the time.
Also note that by default Stow automatically ignores a “sensible”
built-in list of files and directories such as CVS, editor
backup files, and so on. See Ignore Lists, for more details.
(N.B. the name --defer was chosen in the sense that the package currently being stowed is treated with lower precedence than any already installed package, not in the sense that the operation is being postponed to be run at a later point in time; do not confuse this nomenclature with the wording used in Deferred Operation.)
For example, the following options
--defer=man --defer=info
will cause stow to skip over pre-existing man and info pages.
Equivalently, you could use ‘--defer='man|info'’ since the argument is just a Perl regex.
Note that the regular expression is anchored to the beginning of the path
relative to the target directory, because this is what you will want to do most
of the time.
--override=man --override=info
will permit stow to overwrite links that point to pre-existing man and info pages that are owned by stow and would otherwise cause a conflict.
The regular expression is anchored to the beginning of the path relative to
the target directory, because this is what you will want to do most of the time.
When stowing, if a target is encountered which already exists but is a plain file (and hence not owned by any existing stow package), then normally Stow will register this as a conflict and refuse to proceed. This option changes that behaviour so that the file is moved to the same relative place within the package's installation image within the stow directory, and then stowing proceeds as before. So effectively, the file becomes adopted by the stow package, without its contents changing.
This is particularly useful when the stow package is under the control of a version control system, because it allows files in the target tree, with potentially different contents to the equivalent versions in the stow package's installation image, to be adopted into the package, then compared by running something like ‘git diff ...’ inside the stow package, and finally either kept (e.g. via ‘git commit ...’) or discarded (‘git checkout HEAD ...’).
The following action flags are supported: