I am a newbie to using symlinks, so I want to make sure I understand what they do. I’m trying to test out a tutorial I found on a Linux Mint community page for creating a shared data partition between OSes. I have successfully linked the directories on the data partition to those in my /home directory (Note: I am using a test installation for this. All my data is safely on another drive).
I downloaded some test documents from the Net (Manjaro User Guides) to the Downloads in /home. They showed up in both ~/Download and the corresponding directory on the data partition as expected. When deleted the files from ~/Downloads, they also disappeared from the data partition.
If I’m understanding this right. The symbolic links are NOT storing the files saved to them and copying to the data partition. The files are stored to the data partition and the symlink merely displays its contents; like a mirror. So when I go to the symlink and see a file displayed there, I’m actually looking at a file stored on the data partition. Anything I do to that file from the symlink side will be affecting the file on the data partition. If I delete it, it will be deleted from the data partition just as if I had deleted it directly from the data partition manually.
If the symlink points at a directory and you delete a file under the symlinked directory, then you are correct. But a deletion on the symlink itself will only delete the symlink, not the directory or file it points at.
In Windows, the “shortcut” is implemented only in the GUI ─ and not all applications know how to deal with them ─ while in UNIX, a symbolic link is implemented at the level of the underlying filesystem itself ─ provided that it is a POSIX filesystem, of course, because FAT-based filesystems and NTFS don’t support symbolic links.