Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jan 2005 16:54:34 -0800
From:      Sean McNeil <sean@mcneil.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: test(1) unexpected result  (to me)
Message-ID:  <1105491274.67086.2.camel@server.mcneil.com>
In-Reply-To: <41E47226.8050001@elischer.org>
References:  <41E47226.8050001@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-tv0lCrwrHrdz8oe0cldC
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Tue, 2005-01-11 at 16:41 -0800, Julian Elischer wrote:
> # ls -l /sys
> lrwxrwxrwx  1 root  wheel  11 Sep  4 22:03 /sys -> usr/src/sys
> # if [ /sys -ef /usr/src/sys ]
>  > then
>  > echo same
>  > else
>  > echo no
>  > fi
> no
>=20
>=20
> I would have expected the result "same"
>=20
> comments?

By "same file" they mean each references the same inode.  Since this is
a symlink, the files do not refer to the same file.

You can see that if it were a hard link the result would be "same"
echoed.

Cheers,
Sean


--=-tv0lCrwrHrdz8oe0cldC
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQBB5HVKyQsGN30uGE4RArsUAJ9GGwiJyAVy1Nm8ol1fSzL31L2ShwCeOXVD
aYRNG1m0RUS1kH3LqgE6RIE=
=eJlX
-----END PGP SIGNATURE-----

--=-tv0lCrwrHrdz8oe0cldC--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1105491274.67086.2.camel>