bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rln, a potential new core util


From: Pádraig Brady
Subject: Re: rln, a potential new core util
Date: Wed, 22 Feb 2006 10:45:25 +0000
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)

David Laurence Emerson wrote:

># rln by David Laurence Emerson <address@hidden>
># version 0.01
># 2006-02-21
>#
># This bash script is insanely slow and would be well replaced by a c
># implementation.
>#
># rln stands for "relative (sym)link".  It helps create symlinks by
># intelligently finding an efficient relative path.
>#
># Suppose you have a directory structure "/a/b/c/d/e".
># Within "e" there are several files E1 E2 E3 E4 E5 E6.
># Now, say you want quick access to several "E" files from within "/a"
># One convenient way to achieve this is by making a few symlinks.
>#
># It would be nice to "cd /a/b/c/d/e" and "ln -s E2 E4 E6 /a"
># But that makes links like E4 -> E4 instead of E4 -> b/c/d/e/E4
># With "ln -s" you must explicitly specify each path relative to "/a",
># necessitating many keystrokes:
># "ln -s b/c/d/e/E2 b/c/d/e/E4 b/c/d/e/E6 /a"
># (or something silly like
>#      "for i in E2 E3 E4; do ln -s b/c/d/e/$i /a; done")

Thanks for that. I'm not sure how useful it is though.
Could you not use `cp -s` to achieve what you want?
Personally I would prefer the longer "for" syntax
rather than pollute the namespace with another
command for a not very common operation.
Also you may be interested in the findbl component of fslint:
http://www.pixelbeat.org/fslint

thanks,
Pádraig.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]