How to get relative path from two absolute paths in linux shell?
Posted
by Zebooka
on Stack Overflow
See other posts from Stack Overflow
or by Zebooka
Published on 2010-05-13T03:56:57Z
Indexed on
2010/05/13
4:04 UTC
Read the original article
Hit count: 347
We have two paths. First one is directory, second either dir or file.
/a/b/c and /a/d/e.txt
Relative path from first path to second will be: ../../d/e.txt
How to get it in linux terminal?
PS: For those who ask "what is use case?" - creating lots of relative symlinks (just as an example)
© Stack Overflow or respective owner