0

I tried to create a dotfiles directory and manage multiple dot files directly under the home directory.

I accidentally set up a symbolic link to multiple unmanaged dot files.

If you check directly under the home directory, for example

$ ls -la .file
> .file @-> /Users/name/dotfiles//.file

Like, the real file has been changed to a symbolic link.

And of course, there is no .file in /Users/name/dotfiles// where it is shown to exist. This is because it was not originally managed within dotfiles, nor moved to dotfiles.

How can I convert multiple dot files that have been changed to symbolic links back to actual files?

Simba
  • 23,537
  • 7
  • 64
  • 76

1 Answers1

0

If you've clobbered a real file and replaced it with a link going nowhere, there's no easy way to restore it back to its previous form. You can remove the link with rm <filename> and recreate the file.

James Tomasino
  • 3,520
  • 1
  • 20
  • 38