On 19/03/2019 22.07, L A Walsh wrote:
On 3/10/2019 7:40 AM, Carlos E. R. wrote:
I want to create relative paths. Googling told me I need to use: realpath --relative-to=something someotherthing But I can't find the correct concoction. I have the following structure (TV recordings): /home/cer/FusionTst/Videos/3_MyBook_Videos/Lore.mpeg /home/cer/FusionTst/Videos/3_MyBook_Videos/Big Bang/notes /home/cer/FusionTst/Videos/3_MyBook_Videos/Big Bang/Season 6/06x01.mpeg
From that list of absolute paths, I want to produce a relative one: This is without synmlinks.
cer@Isengard:~/FusionTst/Videos> tree 3_MyBook_VideosTst/ 3_MyBook_VideosTst/ ├── Big Bang │ ├── notas (copy of Big Bank/notes, above?) │ ├── Season 1 │ │ ├── episode dos.mpeg │ │ ├── episode tres.mpeg │ │ └── episode uno.mpeg │ └── Season 2 │ ├── episode dos.mpeg │ ├── episode tres.mpeg │ └── episode uno.mpeg └── notas (where does this come from?)
--- Where did Lore.mpeg go? With season 6/06x01.mpeg -- what filename does that map to? "BB/Seas6/ep six.mpeg ?" (abbreviated a bit)
No, it is a movie, not an episode. I used that one for the example because the name was short :-) https://en.wikipedia.org/wiki/Lore_(film)
---- So you want to create your own directory structure where the source is the semi-flat structure probably created by some download program?
No, the structure is the same as made by the recording program. They are not downloads, but automatic recordings. So, not under my control, except where I place the root.
BTW, Are these all on the same volume such that hardlinks are also an option? Just curious if that's an option, dunno if they would be useful.
No, they are different disks. Simply when the main disk fills, I move movies to the second disk. I want to use relative links because when I mount both disks remotely (nfs, sshfs) the absolute paths are no longer valid and the links fail. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)