← 返回命令列表

Linux command

stow 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Stow a package

stow [package]

Stow to specific target

stow -t [/target/directory] [package]

Unstow a package

stow -D [package]

Restow

stow -R [package]

Simulate stow

stow -n [package]

Stow with verbose output

stow -v [package]

Stow from specific directory

stow -d [/path/to/stow/dir] [package]

Adopt existing files

stow --adopt [package]

说明

stow is a symlink farm manager that creates symbolic links from a source tree to a target directory. It's commonly used to manage dotfiles, organize software installed in /usr/local, and maintain configuration files. Packages are directories containing files organized as they should appear in the target. Stow creates symlinks in the target directory pointing to files in the package directory, maintaining the directory structure. For dotfiles management, stow directories typically mirror home directory structure, allowing version control of configurations while keeping them active via symlinks.

参数

-d _dir_, --dir= _dir_
Stow directory (default: current).
-t _dir_, --target= _dir_
Target directory (default: parent of stow dir).
-S, --stow
Stow packages (default action).
-D, --delete
Unstow packages.
-R, --restow
Restow (unstow then stow).
-n, --no, --simulate
Dry run, don't make changes.
-v, --verbose
Increase verbosity.
--adopt
Adopt existing files into package.
--ignore= _regex_
Ignore files matching pattern.
--defer= _regex_
Defer to existing files.
--override= _regex_
Override existing files.

FAQ

What is the stow command used for?

stow is a symlink farm manager that creates symbolic links from a source tree to a target directory. It's commonly used to manage dotfiles, organize software installed in /usr/local, and maintain configuration files. Packages are directories containing files organized as they should appear in the target. Stow creates symlinks in the target directory pointing to files in the package directory, maintaining the directory structure. For dotfiles management, stow directories typically mirror home directory structure, allowing version control of configurations while keeping them active via symlinks.

How do I run a basic stow example?

Run `stow [package]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -d _dir_, --dir= _dir_ do in stow?

Stow directory (default: current).