On Sat, Jun 22, 2002 at 09:06:44PM +0200, Anne et Bertrand wrote: > But I find this inconsistent with "cp". > If I do : > cd /usr/local/j2re/plugins/ppc/mozilla/ > cp javaplugin_oji.so /a_path_to_a_target_place/
The behavior of ln is standard across all *nix OSes in this regard. The purpose of this behavior is to allow you to create symbolic links that are relative rather than explicit in their path. Take the following file system layout: / /a /a/numbers/1 /a/numbers/2 /a/words/ /b Now let's say you want to link /a/numbers/1 /a/words/one. If you executed: ln -s /a/numbers/1 /a/words/one Then you'd have such a link. But let's say you move everything in /a to /b. Then your /b/words/one link would be broken. However, if you do: (cd /a/words; ln -s ../1 one) Then even if you move all the contents of /a to /b then the link will still work. In order to mimic the apparent behavior ln would have to expand relative paths automagically for you. But if it did this it would make what I just showed you not possible. At any rate cp doesn't really expand the relative paths. It just uses them. And of course once the file is written it can be accessed no matter if you're using relative or explicit paths. Hope this increases your understanding... :) -- Ben Reser <[EMAIL PROTECTED]> http://ben.reser.org We tend to see all wars through the lens of the current conflict, and we mine history for lessons convenient to the present purpose. - Brian Hayes