3 ms·
I just learned that rustup/rustc/cargo etc. work like this too. I couldn't understand why the gentoo formula was symlinking the same binary to a bunch of aliase
by cubist_castle 2y ago
I just learned that rustup/rustc/cargo etc. work like this too. I couldn't understand why the gentoo formula was symlinking the same binary to a bunch of aliases.
- kbolino 2y agoOn my system, these are hardlinks (regular files with a link count >1 and the same inode) rather than symlinks, though I'm not sure why.
- mostthingsweb 2y agoMaybe to avoid broken links if you move the original files? That's the main benefit of hardlinks vs symlinks in my mind at least.
- actionfromafar 2y agoThat can also be a downside, you believe you have moved stuff but now you can have different versions of programs that don't expect that to be a possibility.
- ForOldHack 2y agoIf there is a simlink, a hardlink and an executable, all with the same name, which one will it run? Which one will the shell object to? Which one should the shell object to. If a virus/SUID program overwrites a simlink, no problem, but ift it traces the simlink to the executable, and then over writes that...
- duped 2y agoclang does this too.
- alerighi 2y agoAnd that makes a lot of sense, especially for binaries that are statically linked (as usually are Rust binaries), since that could save a lot of disk space!