We have two paths. First one is directory, second either dir or file.
Relative path from first path to second will be:
How to calculate that in Linux terminal? For those who ask “What is usage case?” one could use this—or example—to create lots of relative symlinks.