Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!romp!auschs!awdprime!woan!ron From: ron@woan (Ronald S. Woan) Newsgroups: comp.unix.aix Subject: Re: How to test for soft links ?? Keywords: Yes in ksh... Message-ID: <4442@awdprime.UUCP> Date: 3 Dec 90 23:25:04 GMT References: <898@ki.UUCP> Sender: news@awdprime.UUCP Reply-To: woan@peyote.cactus.org Organization: Austin School of Hardknocks Lines: 23 In article <898@ki.UUCP>, dwatts@ki.UUCP (Dan Watts) writes: Dan> On the IBM RS/6000, is there a way to test to see if a file is a Dan> soft link? Under BSD, the "-h" option to test does this. For Dan> sysV, the option is "-l". I'm running AIX 3.1 and the man page Dan> for test doesn't show anything. Is it possible that they left Dan> this ability out?? I've got a few shell scripts that need to Dan> know whether the file is a _real_ file or just a soft link. I Dan> guess I could write a little C program to figure out the file Dan> type and return 0 or 1, but I'd rather just use test if at all Dan> possible. Interesting, I looked in the BSD 4.3 (URM) manual under TEST(1) and it makes no mention of the -h manual; are you sure that it's not part of your shell somehow? If it is not documented in the manual, chances are the AIX programmers didn't know about it... In any case, I'll try it out on a Sun at home... If you are using ksh for your shell script, "test -L filename" returns existence and symbolic link... +-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+ +------------------------------My Employer----------------------------------+ + Ronald S. Woan woan@peyote.cactus.org or woan%austin@iinus1.ibm.com + + other email addresses Prodigy: XTCR74A Compuserve: 73530,2537 +