For instance, I put symbolic links into ~/.local/bin/ which point to real executable files in ~/Dotfiles.d/local/.local/bin/.

I use the following instructions to do that:

$ cd ~/Dotfiles.d/
$ stow -v local

so stow will create links for all files in local (which contains .local/bin/*) into ~/.local/bin/*

But when I need to add new files into the bin directory, whether I add file in ~/.local/bin/ or ~/Dotfiles.d/local/.local/bin/, stow is not able to sync files between these two directories.

What I want is:

  1. If add new file into ~/.local/bin/ directly, it will actually add new file into ~/Dotfiles.d/local/.local/bin automatically, and create a symbolic link into ~/.local/bin/ automatically.
  2. If I add new file into ~/Dotfiles.d/local/.local/bin/, it will automatically create a symbolic link of this file into ~/.local/bin/.

Is stow able to do that?


GNU Stow does not implement two-way or continuous synchronization, nor was it ever intended to. Its main job is to manage symlinks in the target directory which point to files and directories in Stow package trees under the Stow directory. (See the Terminology section of the manual for precise definitions of these terms.)

So the answers to your two requests are:

  1. No, this is not possible by design, because Stow has no way of knowing whether you would want the new file to be placed in the local package or some other package under your Stow directory (~/Dotfiles.d). Having said that, if the new file is also added to the corresponding path under the local package tree, then the --adopt option can turn it from a normal file under ~/.local/bin/ into a symlink.
  2. If by automatically, you mean without user intervention, then no, because unlike services such as the Dropbox daemon, Stow does not run continuously. However if you run stow local a second time then yes it will create the symlink you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.