Working around symlinks #3520
dgudim
started this conversation in
Show and tell
Replies: 2 comments 1 reply
-
Very neat, thanks for sharing :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Windows users may be able to achieve similar behaviour using junction points, and on macOS using |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to move my
.config
and.cache
to a faster nvme drive.The first logical action was to move the directory over to the new drive and symlink it back, so I did.
But chezmoi was not particularly happy with that, the symlinks got treated as symlinks and not directories (duh) and chezmoi prompted me with this:
Soooo, it wanted to overwrite the symlink with a real directory, I needed a different solution.
Bind mounts to the rescue!
I remembered that on linux there is such thing as a bind mount, which basically allows to mount a directory as if it was a drive!
So I went and added 2 lines to my fstab:
Now I am happy and chezmoi is happy 😎.
Maybe this helps someone.
Beta Was this translation helpful? Give feedback.
All reactions