tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: "test -e" tests target of symlink

On Mon, 04 May 2009, Jan Schaumann wrote:
> test(1) says:
>      -e file       True if file exists (regardless of type).
  [testing a dangling symlink returns false]
> Is this intentional, and if so, should this maybe be explicitly noted in
> the manual page?

Yes, this is intentional.  "-h" or "-L" are the only tests that will
return true for dangling symlinks.  The documentation could be better.

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index