Please read Why does ls .. show real parent content when I'm inside a symbolic link directory? and my answer there. And then this answer about cd and pwd.
A tool like your mv, your vim or ls (in the linked question) always knows its current working directory as a physical path. It could know the logical path if it examined the $PWD environment variable that should certainly be in the environment when the tool is invoked from a shell. Hardly any tool uses $PWD, the mentioned tools don't, we can say that not using $PWD is the common behavior.
Therefore for your mv .. means "the parent directory in the physical path to the current working directory".
After cd /symlink-folder/subfolder the logical path is /symlink-folder/subfolder, but the physical path is /folder/subfolder. For any tool that doesn't use $PWD .. will mean /folder. Only tools that do use $PWD will treat .. as /symlink-folder.
To make mv work as you want, you need to use $PWD one way or another. You can parse $PWD somehow and/or you can use a tool that uses the variable. The cd builtin in your shell and pwd (which may be a builtin or a separate executable) are such tools.
E.g. instead of mv file.txt .. you can do:
(cd -L .. && mv subfolder/file.txt .)
(where I used a subshell, so the current working directory of your main shell does not change). Here cd -L .. uses $PWD, but also your brain had to parse $PWD to know what string to prepend to file.txt. Such parsing can be automated, but it's quite cumbersome. If it's a one-time job then IMO using the brain for parsing is the right thing to do.
Alternatively you can do this:
mv file.txt "$(cd -L .. && pwd)"
Here cd -L .. uses $PWD and puts the subshell (executing the insisde of the command substitution) in .. according to the logical path. Then pwd prints the then-working directory (and I think ultimately it doesn't matter if it's pwd -L or pwd -P). This method does not require you to parse $PWD by hand (or rather by brain).
Another solution is to directly manipulate $PWD as a string:
mv file.txt "${PWD%/*}/"
${PWD%/*} expands to the content of $PWD without the last slash and everything after (Remove Smallest Suffix Pattern, here). This transforms /symlink-folder/subfolder into /symlink-folder. But if the current working directory was /, then the result would be an empty string which is wrong; therefore I postpend one / and in case of / I would get / (which is good because /.. means /). In our case of /symlink-folder/subfolder I get /symlink-folder/ which is as good as /symlink-folder when interpreted (by mv) as a destination directory.
This method should behave well for any $PWD. $PWD should always contain an absolute path whithout . or .. components (that could otherwise make the method misbehave).
vi ../fooresults in the same issue: the file gets saved to the linked directory's parent, not the working directory's parent. So it's got to be some kind of issue with how WSL is treating symlinks – ewok Jun 14 '23 at 13:26lnman page (https://man7.org/linux/man-pages/man1/ln.1.html) it looks like the links might be getting created with the-roption active, even though I'm not passing-rinto the command? – ewok Jun 14 '23 at 14:03ls -la symlinkName. – harrymc Jun 14 '23 at 14:37
– ewok Jun 14 '23 at 15:37lrwxrwxrwx 1 me me 20 Jun 14 10:03 subfolder -> /folder/subfoldermvorcpwhen an argument (specifically an argument passed asSOURCE) is a pathname of a symlink. For OP'smv file.txt ..this would be relevant iffile.txtwas a symlink, but it's not a symlink. The issue is with..interpreted according to the physical path (see my answer), this answer does not address this at all. Maybe you have been misled byfile.txt -> /folder/subfolder/file.txtpresent in the revision 1; it suggestedfile.txtis a symlink, but in the context of the rest of the question it made no sense and it's now corrected. – Kamil Maciorowski Jun 14 '23 at 18:52