I was following the Dotfiles exercises in the CLE MIT Missing Semester course and I messed up. I created a dotfiles
directory and moved all the dotfiles in my home folder to that directory, then I ran the following code from dotfiles
:
for filename in dotfiles
do
ln -s $filename dotfiles/$filename
end
Basically, I symlinked everything in the wrong direction. Now all those dotfiles in my home directory are useless, and all the dotfiles in the dotfiles
directory are pointless because they don't actually point to anything.
Is there any solution to this problem that doesn't involve deleting all my dotfiles and reinstalling everything? I'm using macOS Monterey.
I tried using the unlink
command but that just deletes the files. I'm looking for a solution where I can keep all my dotfiles and just remove the symlinks.