Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mit-eddie!uw-beaver!teknowledge-vaxc!mkhaw From: mkhaw@teknowledge-vaxc.ARPA (Michael Khaw) Newsgroups: comp.unix.wizards Subject: Re: symbolic links are a botch Message-ID: <13993@teknowledge-vaxc.ARPA> Date: Wed, 24-Jun-87 04:06:55 EDT Article-I.D.: teknowle.13993 Posted: Wed Jun 24 04:06:55 1987 Date-Received: Thu, 25-Jun-87 06:54:41 EDT References: <2629@ulysses.homer.nj.att.com> <2200015@hpisoa1.HP.COM> <917@bloom-beacon.MIT.EDU> <1008@killer.UUCP> Reply-To: mkhaw@teknowledge-vaxc.UUCP (Michael Khaw) Organization: Teknowledge, Inc., Palo Alto CA Lines: 22 In article <1008@killer.UUCP> jfh@killer.UUCP (John Haugh) writes: >biggest problem I had was understanding what I got if I stat(2)ed a symbolic >link. My USG-Unix brain says I should get a stat structure saying I found >a symbolic link. But I don't seem to believe this is the way it works. > "man 2 stat" on my Ultrix system says that - stat(2) gets you information on the file - lstat(2) gets you information about the symlink if the file is a symlink, otherwise it's just like stat() so stat() doesn't let you know if you gave it a symlink, because it returns information about the target of the symlink. Mike Khaw -- internet: mkhaw@teknowledge-vaxc.arpa usenet: {hplabs|sun|ucbvax|decwrl|sri-unix}!mkhaw%teknowledge-vaxc.arpa USnail: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303