> On Sat, Oct 07, 2000 at 01:17:39PM -0400, Mike A. Harris wrote:
> > Which illustrates an important issue I recommend to
> > everyone. When copying or moving files to a DIRECTORY, specify
> > that that is what you are intending by prepending a trailing
> > "/" on to the end. Thus if you do:
> >
> > cp *.h /usr/local/include/
> >
> > If that directory does not exist you will get an error instead of
> > a mess. ANY time I use a directory on the commandline of ANY
> > command in Linux, or in a script, I ALWAYS use a trailing "/" as
> > it prevents this problem. If you're worried about double slashes
> > being used via scripts, don't worry, it is handled correctly, for
> > example:
> >
>
> And this is of course utterly non-portable:
>
> aton:~/tmp$ uname -a
> SunOS aton 5.6 Generic_105181-17 sun4u sparc SUNW,Ultra-2
> aton:~/tmp$ echo 1234 > file
> aton:~/tmp$ ls -l
> total 2
> -rw------- 1 jmunsin infpersonal 5 Oct 10 12:42 file
> aton:~/tmp$ cp file dir/
> aton:~/tmp$ ls -l
> total 4
> -rw------- 1 jmunsin infpersonal 5 Oct 10 12:42 dir
> -rw------- 1 jmunsin infpersonal 5 Oct 10 12:42 file
I think the utterly portable solution is "cp file dir/." to be
certain. I remember using that back with older versions, but I haven't
seen it in ages. Of course SunOS (not Solaris) is BSD based, which is V7
based, I believe. I think the brance was V7 to BSD, to SysIII and some
other, now extinct, version.
--
-bill davidsen ([EMAIL PROTECTED])
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]