Symlinking to a directory gives to different results with ls -l depending on whether I ln -s dir or ln -s dir/. But what's the actual difference, and which one should I prefer why?
Should I include a trailing slash / in a symlink to a directory?
directory;symlink
There's no difference. (There would be a difference if the target was not an existing directory.)The final slash might have ended up there because of shell completion: with some configuration, ln -s tarTabSpacelink completes to ln -s target/ link.