[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug or feature? replace symlink to directory with ln -fs does not work
From: |
Peter Kratzer |
Subject: |
Bug or feature? replace symlink to directory with ln -fs does not work |
Date: |
Mon, 23 May 2005 18:31:16 +0200 |
Dear friends,
I have encountered a problem using the command ln -sf to replace a symlink
to a directory by a symlink to a different directory.
Working in a heterogenous environment with GNU/Linux and HP-UX workstations
I found a different behaviour in this command's handling on the two
operating systems.
Contrary to the Unix behaviour (e.g. HP-UX) using this command on a
GNU/Linux system does not replace the link, but creates a new link in the
originally referenced directory.
Is this a bug, or is this behaviour intentional?
Example:
Initial situation is a directory with two (empty) subdirs and a symlink,
e.g.
drwx... dir.0
drwx... dir.1
lrwx... dirlink -> dir.0
The command "ln -sf dir.1 dirlink" gives two different results on the
different operating systems:
On GNU/Linux systems the result is:
drwx... dir.0
lrwx... dir.0/dir.1 -> dir.1
drwx... dir.1
lrwx... dirlink -> dir.0
Whereas on HP-UX systems the result is:
drwx... dir.0
drwx... dir.1
lrwx... dirlink -> dir.1
If this behaviour of the GNU utilities is not intentional I could make a
proposal of the necessary changes in ln.c (if you are interested).
If this behaviour of the GNU utilities is indeed intentional I would
suggest a related note in the documentation.
With best regards,
Peter Kratzer
IT Administrator
Philips Semiconductors GmbH Phone: +49 8151 270-105
Petersbrunner Str. 17 Fax: +49 8151 270-200
D-82319 Starnberg mailto:address@hidden
- Bug or feature? replace symlink to directory with ln -fs does not work,
Peter Kratzer <=