Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!uwm.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!stiatl!pda From: pda@stiatl.UUCP (Paul D. Anderson) Newsgroups: comp.unix.questions Subject: Re: Which is more efficient... Message-ID: <9074@stiatl.UUCP> Date: 20 Feb 90 21:44:14 GMT References: <9064@stiatl.UUCP> Distribution: usa Organization: Sales Technologies Inc., "The Prototype IS the Product..." Lines: 20 pda@stiatl.UUCP (Paul D. Anderson) writes: >Which is more efficient (ie: cheaper and faster) in a program? > - to chdir("/path") and then unlink("file") for each file in the Let me clarify my question from the previous posting: I know of namei() in the kernal, it has been suggested that doing the chdir() first will mean namei() will not have to be invoked as often. But does not unlink() have to chase back up the directory structures (re-construct the directory tree) in order to ascertain if the correct permissions exist to allow removal of the file? Therefore, would not calling unlink() with the full pathname be more efficient, since all information is provided to unlink() about the path? >Please E-Mail to me and I will summarize and re-post. thanks, paul -- -- Paul Anderson * h:404-565-0761 w:841-4000 {mathcs.emory,gatech}.edu!stiatl!pda || pda@SalesTech.Com