Path: utzoo!censor!geac!torsqnt!hybrid!scifi!bywater!uunet!rbj From: rbj@uunet.UU.NET (Root Boy Jim) Newsgroups: comp.unix.wizards Subject: Re: Should find traverse symbolic links? Message-ID: <124226@uunet.UU.NET> Date: 27 Feb 91 22:46:47 GMT References: <1991Feb25.130613.2553@phri.nyu.edu> <15319@smoke.brl.mil> Organization: UUNET Communications Services, Falls Church, VA Lines: 38 In article <15319@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes: > >The fundamental problem is that there is no single "right" method of >handling symbolic links. Sometimes one wants them to be truly >transparent, and other times one wants to notice that they are symlinks. Exactly. However, most programs fall into the former category. When they reference a file or directory, all they want is it's contents. Others are concerned with the filesystem structure itself. They often treat file specifications as abbreviations for the entire subtree starting at that node. There are occasions where one might want to follow links anyway, such as when making tar tapes to pick up everything logically below a given directory, or for transport to a machine where symlinks are not supported. In this case, a special option (such as -follow or -h) should be provided. BUT ANYTHING THAT RECURSES SHOULD NOT FOLLOW SYMLINKS BY DEFAULT! PERIOD. >I could tell you stories about my attempts to decide upon appropriate >default behavior for this in utilities such as "find" that I adapted >to work in environments supporting symlinks, but there isn't much >point to doing so. I wish you would. I think the distinction is quite clear. It's in capital letters eight lines above. >The bottom line is that symlinks don't fit very >well into UNIX's idea of hierarchical filesystem structure, and older >utilities were not designed to provide reasonable options for coping >with them. Neither do mount points. They make hard links harder to do. -- [rbj@uunet 1] stty sane unknown mode: sane