[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug or feature? replace symlink to directory with ln -fs does not wo
Re: Bug or feature? replace symlink to directory with ln -fs does not work
Tue, 24 May 2005 00:13:20 -0700
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)
address@hidden (Bob Proulx) writes:
> Can you cite the reference? I could not find it here:
> Only -s and -f are required.
Yes, but POSIX requires the GNU "ln" behavior that the original requester
objected to. This behavior uses only -s and -f.
Assuming GNU ln, the other options (which are extensions to POSIX)
come into play only if you don't like the behavior required by POSIX
here. The original requester appears to be in that position.
>> Perhaps you can file a bug report with HP.
> I do not believe it is a standard option and therefore HP-UX is not
> required to support it.
No, the point is that if you look at the original bug report, which
gives an example using only -s and -f, in that example HP-UX ln does
not conform to POSIX but GNU ln does.
>> Recent versions of GNU "ln" support an option -T that should do what
>> you want, e.g., "ln -fsT dir.1 dirlink". Older versions have an -n
>> option that should also work. These options are all POSIX extensions,
>> though, so they might not be portable to HP-UX.
> Can you provide a reference to the standards on -T?
No, -T is not a standard option (though I think it ought to be, and
perhaps some day it will be).
Currently the only portable way to get the effect that the original
requester asked for is to write a C program. (It might be easier just
to install GNU ln. :-)