For the icon themes I'm developing, I have different files with a different number of symlinks placed in different folders. Here is an example of one of them:
FlatWoken/FlatWoken/scalable/apps$ find -L ../ -samefile bluetooth-active.svg
../stock/stock_bluetooth.svg
../status/bluetooth-active.svg
../status/blueman-active.svg
../apps/bluetooth-active.svg
../apps/blueradio-48.svg
../apps/bluetooth.svg
../apps/bluedun.svg
../apps/bluetoothradio.svg
../apps/preferences-system-bluetooth.svg
../apps/blueman.svg
What I would like to do is to find out a terminal command that is able to move all of them in a new folder (let's say, FlatWoken/FlatWoken/24x24 ), without loosing the symlinks (i.e. FlatWoken/FlatWoken/24x24/apps/bluedun.svg should symlink to FlatWoken/FlatWoken/24x24/apps/bluetooth-active.svg ). Is it possible to do so?
For more clarification, if I have this structure:
alecive@calliope:~/Scrivania/temp$ ls *
dest:
a
orig:
a b c
alecive@calliope:~/Scrivania/temp$ ls -l orig/*
orig/a:
totale 0
lrwxrwxrwx 1 alecive alecive 8 apr 9 10:22 link_a -> truefile
-rw-rw-r-- 1 alecive alecive 0 apr 9 10:22 truefile
orig/b:
totale 0
lrwxrwxrwx 1 alecive alecive 13 apr 9 10:23 link_b -> ../a/truefile
orig/c:
totale 0
lrwxrwxrwx 1 alecive alecive 13 apr 9 10:23 link_c -> ../a/truefile
alecive@calliope:~/Scrivania/temp$ ls -l dest/*
dest/a:
totale 0
-rw-rw-r-- 1 alecive alecive 0 apr 9 10:24 truefile
dest/b:
totale 0
dest/c:
totale 0
I would like to fill the dest
folder with the symlinks that point to dest/a/truefile
(and not orig/a/truefile
), without using the absolute path but only the relative path.
Thanks in advance for any help!