[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Manual descriptions for -a file and -e file
From: |
Emanuele Torre |
Subject: |
Re: Manual descriptions for -a file and -e file |
Date: |
Mon, 27 Mar 2023 09:35:32 +0200 |
User-agent: |
Mutt/2.2.10 (2023-03-25) |
On Mon, Mar 27, 2023 at 09:20:27AM +0200, Andreas Kusalananda Kähäri wrote:
> Oh, about -L and -h: The description in the POSIX standad for these
> two are identical, without pointing out that they are identical. So
> there is a precedence there.
>
> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
Thankfully, FreeBSD avoids confusions caused by the existence of those
two identical primaries by claiming that -h is not guaranteed to be
supported and that -L should always be used instead:
-h file True if file exists and is a symbolic link. This operator
is retained for compatibility with previous versions of
this program. Do not rely on its existence; use -L
instead.
-L file True if file exists and is a symbolic link.
https://www.freebsd.org/cgi/man.cgi?test
OpenBSD also avoids confusions by claiming that -L is not guaranteed to
be supported and that -h should always be used instead: :D
-h file True if file exists and is a symbolic link.
-L file True if file exists and is a symbolic link. This operator
is for compatibility purposes. Do not rely on its
existence; use -h instead.
https://man.openbsd.org/test
emanuele6