On May 31, 2006, at 7:03 AM, Eric Iverson wrote:

The command:
 sudo mv libj601.dylib /usr/lib/.
is correct (the final . means keep the same name).
However, this points out that the shorter, simpler and less confusing:
 sudo mv libj601.dylib /usr/lib
would work just as well.

Hello,

Not to be pedantic, but there is a distinct benefit to using a trailing "." when copying to a directory: it avoids the unintentional creation of a file when the target directory doesn't exist.

In other words, if the directory "/usr/local/lib" did not exist, and the following command were given:

   mv foo.dylib /usr/local/lib

the result would be a file named "/usr/local/lib" with the contents formerly named as "foo.dylib".

However, if following command were given, under the same circumstances:

   mv foo.dylib /usr/local/lib/.

then an error would result:

   mv: rename foo.dylib to /usr/local/lib/.: No such file or directory


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to