On Fri, 6 Oct 2000, Mark wrote:
>Date: Fri, 6 Oct 2000 15:59:58 -0700 (PDT)
>From: Mark <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Cc: cdwrite <[EMAIL PROTECTED]>
>Content-Type: text/plain; charset=us-ascii
>Subject: Re: /usr/local/include
>
>> While attempting to install an unrelated package, the installation
>>failed. Going over some of the errors I've found that the install script
>>failed at creating a directory, namely '/usr/local/include', saying that
>>the directory already exists.
>> When i looked at /usr/local i found not a directory, but a file,
>>named - you guessed it - 'include'. When I looked at the contents of that
>>file it seemed like it came from some cd writing (or scsi) related thing
>>(I'm not versed at all in C).
>> My question is: can i safely delete that file and make an 'include'
>>dir instead?
>
>Sort of. It's a common mistake with installation of new software. In
>this case the command "cp cdda_interface.h /usr/local/include" has
>been run with no directory called "/usr/local/include existing.
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:
cp *.h /usr////local///////////include////////////
should still work.
Example:
pts/0 root@gw:~# cp apache-1.3.12-2.i386.rpm ////var/////////tmp/////////
apache-1.3.12-2.i386.rpm -> ////var/////////tmp/////////apache-1.3.12-2.i386.rpmpts/0
root@gw:~# dir /var/tmp
total 423
drwxrwxrwt 2 root root 1024 Oct 7 13:15 ./
drwxr-xr-x 16 root root 1024 Jul 29 21:38 ../
-rw-r--r-- 1 root root 427362 Oct 7 13:15 apache-1.3.12-2.i386.rpm
As you can see, the extraneous "////"'s are removed
internally. So adding on a slash at the end isn't going to ever
do the wrong thing.
Just some ideas to toss around...
TTYL
----------------------------------------------------------------------
Mike A. Harris - Linux advocate - Open source advocate
Computer Consultant - Capslock Consulting
Copyright 2000 all rights reserved
----------------------------------------------------------------------
[Quote: Linus Torvalds - Aug 27, 2000 - linux-kernel mailing list]
"And I'm right. I'm always right, but in this case I'm just a bit more
right than I usually am." -- Linus Torvalds
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]