Re: perl in /usr/bin

2004-01-21 Thread Ken Williams
On Thursday, January 15, 2004, at 02:12  PM, John Delacour wrote:

At 12:57 pm +0100 15/1/04, Stephan Hochhaus wrote:

is the file /usr/bin/perl just a link to /usr/bin/perl5.8.1 and could 
therefore easily replaced by /usr/local/bin/perl5.8.2 (as an 
example)? Or would that break anything?
Provided you install the later version in Apple's default location, 
/usr/bin/perl will be overwritten with perl 5.8.2, 5.8.3 or whatever 
and will be identical to the latest installation.  This is how things 
look in my directory:

-rwxr-xr-x  2 root  wheel987340  8 Jan 19:47 perl
-rwxr-xr-x  1 root  wheel987076  9 Nov 13:56 perl5.8.1
-rwxr-xr-x  1 root  wheel 21924 18 Nov 10:14 perl5.8.2
-rwxr-xr-x  2 root  wheel987340  8 Jan 19:47 perl5.8.3
John: overwritten is the wrong term here, linked would be better - 
your 'perl' and 'perl5.8.3' files are linked to the same inode.  That's 
why they have a 2 in the first numerical column, while the other two 
files have a 1.  Here's an excerpt from `man ls`:

 If the -l option is given, the following information is displayed 
for
 each file: file mode, number of links, owner name, group name, 
number of
 bytes in the file, abbreviated month, day-of-month file was last 
modi-
 fied, hour file last modified, minute file last modified, and the 
path-
 name.

Stephan: there's no way to tell a hard link from a regular file, 
because creating a hard link to an existing file simply creates an 
additional way to access the existing file's inode through a different 
name.  After creating the link, the original file and the new file have 
equal status, neither is subordinate to the other anymore.  To see 
whether two files point to the same inode, you can do `ls -i`.

This is all in contrast to soft links, i.e. symbolic links, which 
point by name to the original file, and remain subordinate to it.  If 
you deleted the original file, a hard link would work fine but a soft 
link wouldn't work anymore.

 -Ken



Re: perl in /usr/bin

2004-01-15 Thread Doug McNutt
At 12:57 +0100 1/15/04, Stephan Hochhaus wrote:
ps: How can I find out if a file is just a link from this:
-rwxr-xr-x  2 root   wheel 19944 24 Sep 09:00 perl


try
cd /usr/bin
file perl

or

man file



-- 
--  There are 10 kinds of people:  those who understand binary, and those who don't 
--


Re: perl in /usr/bin

2004-01-15 Thread John Delacour
At 12:57 pm +0100 15/1/04, Stephan Hochhaus wrote:

is the file /usr/bin/perl just a link to /usr/bin/perl5.8.1 and 
could therefore easily replaced by /usr/local/bin/perl5.8.2 (as an 
example)? Or would that break anything?
Provided you install the later version in Apple's default location, 
/usr/bin/perl will be overwritten with perl 5.8.2, 5.8.3 or whatever 
and will be identical to the latest installation.  This is how things 
look in my directory:

-rwxr-xr-x  2 root  wheel987340  8 Jan 19:47 perl
-rwxr-xr-x  1 root  wheel987076  9 Nov 13:56 perl5.8.1
-rwxr-xr-x  1 root  wheel 21924 18 Nov 10:14 perl5.8.2
-rwxr-xr-x  2 root  wheel987340  8 Jan 19:47 perl5.8.3
I have upgraded always using the instructions here, opting always to 
replace the previous installation.  Other people may have different 
preferences, but this has worked fine for me.

http://developer.apple.com/internet/macosx/perl.html

JD