I have a fairly large number of symlinks (more than a hundred in a single folder, and anywhere up to a couple dozen in each of a couple dozen other folders) that don't work after moving from Mate 16.04 to Kubuntu 20.04 (and apparently not accounting for a platter drive that's currently not connected when I recreated /etc/fstab
) -- what used to be /media/user/sdc9
is now just /sdb9
. These are the files I linked based on the accepted answer for this question.
I've verified that making this exact change in these symlinks will correct them so they open the folder they were made to point to. As opposed to either recreating them or manually editing the properties on all of them (which I've done in four, enough to confirm that this fixes the problem) (did I mention there are at least a couple hundred of these, one set spread through a couple dozen folders?), is there an efficient way, ideally with a single command per folder, to change the target of each symlink and replace /media/user/sdc9
with /sdb9
-- and no other changes?
I know there are ways to rename files using wildcards, or feeding the output of ls
into awk
or other arcane-seeming paths. I presume something similar can be done with the contents of these files that behave as pointers to other files or folders. However, despite using Debian-based Linux as my daily driver for almost ten years, I'm not knowledgeable enough with Linux commands to have even a clue what will do what I need here. Stuff like this simply doesn't come up often enough for someone who just wants to get his stuff done to spend hundreds of hours learning it.
/media/user/sdc9
, this would make your symlinks work normally? – mook765 Feb 05 '21 at 08:23