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.
For some more background context, I found it through this Linux Mint support thread. I essentially want to replicate what the OP is trying to do with his rig:
To me symlinks always felt like windows ‘shortcuts’ but with substantially better functionality. Being able to symlink in entire directories for use by software is incredibly useful.
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.