How to change where a symlink points
filesis a symbolic link to
/media/files/tb-prod/files. When you access
filesor anything inside it, you'll really access the path under
/media. Symbolic links are made and updated using the
lncommand. This link could have been made with:
ln -s /media/files/tb-prod/files files
-smeans to make a symbolic link. To update a link, either delete the link and create it as above, or use the
lnas well. If you are linking to a folder, also include the
ln -sfn /a/new/path files
This will replace the link with a new one pointing at
@AndrewAtkinson: you delete a symlink as if it's a normal file, with `rm /path/to/symlink`.
I don't understand what the `-n` does, even after reading the man page. linking to symlinks of directories seems to work without it.. Anyone know?
@naught101 It's not for linking to directories, it's for replacing links to directories instead of making a new link inside the directory.