Just curious: why is /usr/bin/python not a symlink?

Roy Smith roy at panix.com
Fri Feb 24 08:17:25 EST 2012


In article <ji7fbd$drj$1 at r03.glglgl.gl>,
 Thomas Rachel 
 <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915 at spamschutz.glglgl.de> 
 wrote:

> Not only that, [hard and symbolic links] have slightly different 
> semantics.

This is true, but only for very large values of "slightly".

Symlinks, for example, can cross file system boundaries (including NFS 
mount points).  Symlinks can refer to locations that don't exist!  For 
example:

~$ ln -s foobar foo
~$ ls -l foo
lrwxr-xr-x  1 roy  staff  6 Feb 24 08:15 foo -> foobar
~$ cat foo
cat: foo: No such file or directory

Symlinks can be chained (i.e. a symlink points to someplace which in 
turn is another symlink).  They're really very different beasts.



More information about the Python-list mailing list