zsh-users
 help / color / mirror / code / Atom feed
* Converting absolut symlinks to relative ones...?
@ 2016-03-06 13:20 Meino.Cramer
  2016-03-06 17:39 ` Danek Duvall
  0 siblings, 1 reply; 5+ messages in thread
From: Meino.Cramer @ 2016-03-06 13:20 UTC (permalink / raw)
  To: zsh-users

Hi,

following "problem":

At some point in a directory tree there is a file (the reference), 
which is physically copied multiple times into that
tree below that point at different nesting depths.

I want to create a script which will find those files
(already done) and replace those files with a symlink to the
reference file.

Since I dont know of a simple way to calculate the "difference"
of two absolute paths to create a relative path to the reference from the point of
view of its current copy, I came across the idea to create symlinks
with absolute paths to the reference in a first step and hope that there is a
zsh/system/linux utility which will create relative symlinks afterwards...

This idea has one drawback: I dont know of such an utility... ;)


Is there such an utility or is there even an utility which magically do that all
in one turn?

Thank you very much in advance for any help!
Best regards,
Meino





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-06 21:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-06 13:20 Converting absolut symlinks to relative ones...? Meino.Cramer
2016-03-06 17:39 ` Danek Duvall
2016-03-06 19:38   ` Bart Schaefer
2016-03-06 20:21     ` Danek Duvall
2016-03-06 21:22       ` Vin Shelton

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).