I'm curious about how symbolic links function when working with multiple removable drives. If I create a symbolic link on one USB flash drive that points to a file on a different USB flash drive, will that link still work correctly if I mount both drives on another computer? Does this depend on the drives being assigned the same UUID, or is it more about how the operating system handles the mounting?
4 Answers
The symbolic link will use either a relative or absolute path depending on how it's created. If you can guess the right mount point for the other drive, it could work, but there’s no guarantee. I've seen all sorts of setups, from device names to labels, which can complicate things!
Have you actually tried it out? I would think it should work if the drives are mounted at the same points on the other machine. The filesystem likely doesn’t concern itself with UUIDs; it’s mostly about the path to the file. If the USB with the target file is mounted correctly, it should work!
Right! It’s like the classic case of 'it works on my machine.' Just have to be careful with how you mount them!
If the mount points are not exactly the same, I’d lean towards it not working. So, keep that in mind when trying to access files! It's a bit tricky.
Yes, it can work without needing the UUID. If both flash drives are mounted in the same location on the other machine, the symbolic link should function properly. Just make sure that the mount points are consistent!
Exactly, symlinks only rely on the path to the target file. If the symlink points to a non-existent file, it can be broken if you delete that file. The key is ensuring the OS recognizes the symlink format and that it mounts the USB in the correct path.