<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
The links were built by shell commands. THe reference to windows was
simply to give a metaphore about the moving around ability.<br>
<br>
<div class="moz-cite-prefix">On 2/3/2013 15.21, Rick Hornsby wrote:<br>
</div>
<blockquote
cite="mid:7D578FA0-C215-409F-81BC-6AB4458C6E36@gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<br>
<div>
<div>On Feb 3, 2013, at 12:07 , Steve VanSlyck <<a
moz-do-not-send="true" href="mailto:s.vanslyck@spamcop.net">s.vanslyck@spamcop.net</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div>
<p>Can I cut and paste symlinks from a directory to one its
subdurectories and they will still work?</p>
</div>
</blockquote>
That depends on how the symlink was constructed, and if your
window manager understands how to deal with symlinks. Most do,
but I'm not sure if any of them will rewrite the link if you try
to move it. Most of my Linux work over the last few years has
been focused on the server side with no window managers in
sight, so I'm not sure what progress or changes may have come
about.</div>
<div><br>
</div>
<div>To the symlinks themselves:</div>
<div><br>
</div>
<div>Moving a relative link, foo to bar aka foo -> bar, would
not work unless you moved both foo and bar to the same place.
That construction is fairly common, and expects the files to
stay in the same directory.</div>
<div><br>
</div>
<div>Moving an absolute link, foo to /usr/local/lib/bar should
work fine. However, relative links can get more complicated
than that, ie foo -> ../../bar would break if you moved foo,
because you've changed the context that foo lives in, to where
it is going up two directories looking for bar, when it should
be (for example) three.</div>
<div><br>
</div>
<div>I would recommend that instead of futzing with the window
manager, if you want to move a symlink, do it from a shell by
removing the old symlink and creating the new one.</div>
<div><br>
</div>
<div>If you have a symlink /path/to/my_cool_app ->
/home/steveo/projects/my_cool_app, you'd want to</div>
<div><br>
</div>
<div>rm -i /path/to/my_cool_app; ln -s
/home/steveo/projects/my_cool_app /path/to/new/symlink</div>
<div><br>
</div>
<div>(I always have to remind myself that a symlink is target,
link.)</div>
<div><br>
</div>
<div>Check out the man page for ln(1).</div>
<div>
<div>
<blockquote type="cite">
<p> Just like with windows?</p>
</blockquote>
<div>
<p>Windows has no concept of symlinks*, which has over the
years caused me no end of headaches. Windows has
shortcuts, which are an entirely different thing and a
poor excuse for something useful. Shortcuts are actual
files that contain the metadata needed to locate the
target, usually using an absolute path. That's why it
seems that moving them around works without any problems.
Most of the time I found that the only thing which could
understand shortcuts was Windows itself. Very few
applications could follow the shortcut to the target.</p>
<div>However, if you've ever tried to use a shortcut from
the command line, you can't. Because it isn't a symlink.
It is simply a .lnk file that the Microsoft Windows
window manager (Explorer) knows how to deal with.</div>
</div>
<div><br>
</div>
<div>A symlink is fundamentally built into the various *nix
filesystems, and to most applications, indistinguishable
from the target file/directory unless said app is checking
to see if what they're looking at is a symlink.</div>
<div><br>
</div>
<div>-rick</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div>* That's not 100% true. At some point, Microsoft
introduced the concept of file "junctions" into NTFS which
were a half-assed attempt to imitate the behavior of symlinks.
From what I remember, it was poorly documented, hardly anyone
knew they existed (not well published), and they only worked
from the command line though I could be wrong about that.</div>
<div><br>
</div>
<br>
</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
colug-432 mailing list
<a class="moz-txt-link-abbreviated" href="mailto:colug-432@colug.net">colug-432@colug.net</a>
<a class="moz-txt-link-freetext" href="http://lists.colug.net/mailman/listinfo/colug-432">http://lists.colug.net/mailman/listinfo/colug-432</a>
</pre>
</blockquote>
<br>
</body>
</html>