Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Converting absolut symlinks to relative ones...?
- X-seq: zsh-users 21361
- From: Meino.Cramer@xxxxxx
- To: zsh-users@xxxxxxx
- Subject: Converting absolut symlinks to relative ones...?
- Date: Sun, 6 Mar 2016 14:20:13 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author