That doesn't work.
Code:
ln -sT /media/500GB/STEAM/steamapps/common/ETS2Mods "~/.local/share/Euro Truck Simulator 2"
ln: unsuccessful creation of a symbolic link „'~/.local/share/Euro Truck Simulator 2'“: No such file or directory
So I tried with a small "t" and it worked - the link was created (in ETS2Mods/) but when I empty "~/.local/share/Euro Truck Simulator 2", the game keeps looking for the data in it, not in ETS2Mods.
If the link works the way I think it works and it's created in ETS2Mods, maybe I should swap the addresses, like this:
Code:
ln -sT "~/.local/share/Euro Truck Simulator 2" /media/500GB/STEAM/steamapps/common/ETS2Mods
That way (at least theoretically) the link will be created in "~/.local/share/Euro Truck Simulator 2" pointing to ETS2Mods and I'll be able to empty "~/.local/share/Euro Truck Simulator 2" leaving only the link inside it to point to the target dir ETS2Mods.
Nope, the second variant doesn't work either.
What I've posted should work. The syntax is correct.
I've used symbolic links to trick games into using older, or newer versions of shared libraries a number of times in the past. And I've set up symbolic links to redirect to data stored in directories on external devices.
I'd bet that the problem is one of the following:
1. The ln
command didn't perform the expansion of the ~
properly.
I've seen this happen with a few commands in the past.
I'm pretty certain ln works with shell expansions though.
But if the
~/
expansion failed - then the path for the sym-link will be mangled and will therefore be invalid, hence
ln
will unable to create the link. In which case, try using
/home/rado/
or
$HOME/
instead of
~/
.
2. The .local/share
directory doesn't exist
If the
.local/share
directory does not exist -
ln
will not be able to create a link in that directory. So that directory MUST exist before running
ln
.
3. The "Euro Truck Simulator 2" directory already exists in ~/.local/share/
.
If the "Euro Truck Simulator2" directory already exists,
ln
will not be able to create the link because a directory with that name already exists there.
So if there is a directory already there with that name, you'll need to delete, or rename it.
4. You must have the external drive mounted when creating the symbolic link, otherwise ln
will also fail.
If the file-system object you want to link to does not exist - then
ln
will fail to create the link.
If you create a link to something on an external device and then unmount it - the symbolic link will remain on the file-system, but will be broken/invalid until that device is mounted again.
But
ln
CANNOT create a broken symbolic link. So the file-system containing your target file/directory MUST be mounted at the time that you run
ln
to create your link. If it isn't, then
ln
will simply fail to create the link.
So the first thing to try would be this:
To check that you have a
.local/share
directory.
If doesn't exist, create it:
If it does exist - check there isn't a "Euro Truck Simulator 2" directory already in there:
Bash:
ls ~/.local/share | \grep -i Euro
If there IS a "Euro Truck Simulator 2" directory in there - then you'll need to remove it, or rename it, in order to be able to use that name for your symbolic link. So either delete it with
rm
, or rename it using
mv
.
Finally, once you have confirmed that your
.local/share
directory exists AND that you don't already have a "Euro Truck Simulator 2" directory in there, then you should be able to create your symbolic link.
Bash:
ln -sT /media/500GB/STEAM/steamapps/common/ETS2Mods "/home/rado/.local/share/Euro Truck Simulator 2"
If that fails for some reason, perhaps try without the double quotes and escape the spaces instead:
Bash:
ln -sT /media/500GB/STEAM/steamapps/common/ETS2Mods /home/rado/.local/share/Euro\ Truck\ Simulator\ 2
If that fails - I don't know what to suggest!
EDIT: Do NOT use the lowercase
-t
option - that's completely the wrong option. That puts the link in your /media/....../ETS2Mods/ directory....... That's NOT what you want to do.
You need to use the
-T
option, which specifies the /media/...../ETS2/ directory as the TARGET for the link. In other words, it is what the link in ~/.local/share/ will point/redirect to.
From having a quick play with
ln
- using
~
does not appear to be problematic. That seems to work properly - so the problem must be one of the other things. Either the filesystem containing the target directory was not mounted, or
.local/share
does not exist, or
.local/share/Euro Truck Simulator 2
already exists.