Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There should be a way to make relative symlinks #66

Closed
daleglass opened this issue Feb 5, 2021 · 3 comments
Closed

There should be a way to make relative symlinks #66

daleglass opened this issue Feb 5, 2021 · 3 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@daleglass
Copy link

The symlinks being created point to the full path on disk. I'd like to be able to create relative symlinks, so that I can move the data around and back it up and have everything keep working.

@marehr
Copy link

marehr commented Feb 6, 2021

Hiho I searched for the same thing, as you can see there is an entry in the man page about this:

rdfind/rdfind.1

Lines 158 to 160 in fa7752d

The symlink creates absolute links. This might not be what you
want. To create relative links instead, you may use the symlink (2)
command, which is able to convert absolute links to relative links.

You can use https://github.com/brandt/symlinks#convert-absolute-symlink-to-relative for that purpose.

@pauldreik
Copy link
Owner

Sorry for the late reply. I made the links absolute, because making correct relative symlinks seems nontrivial, given that parts of the paths could be relative, different mount points, hardlinks etc. Maybe I am wrong? Perhaps one could consider an opportunistic approach, where a pure text based manipulation is done, and if the candidate resolves to the same inode, pick that candidate. Else bail out and make it absolute.

@pauldreik pauldreik added the enhancement New feature or request label Aug 12, 2021
@pauldreik
Copy link
Owner

Here is an issue showing it is not trivial to make this correct: brandt/symlinks#3

@pauldreik pauldreik added the wontfix This will not be worked on label Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants