Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!rpi!pawl!shadow From: shadow@pawl.rpi.edu (Deven T. Corzine) Newsgroups: comp.sys.amiga.tech Subject: Re: Links vs. aliases Message-ID: Date: 15 Sep 89 06:27:43 GMT References: <19644@gryphon.COM> <1989Sep9.080227.14162@agate.uucp> <2771@abaa.UUCP> <2774@abaa.UUCP> Sender: usenet@rpi.edu Organization: Rensselaer Polytechnic Institute, Troy, NY Lines: 32 In-reply-to: esker@abaa.uucp's message of 12 Sep 89 15:41:30 GMT On 12 Sep 89 15:41:30 GMT, esker@abaa.uucp (Lawrence Esker) said: esker> A hard link involves the disk controller to read an extra esker> sector that points to the real file (or is this a soft link, I esker> sometimes confuse them). In any case, extra disk accesses are esker> certainly going to take more time than links. esker> OOPS, the last line was supposed to say "... take more time esker> than memory resident table lookup." Either way, you're wrong. A hard link to a file is absolutely indistinguishable from the original file. Both are directory entries pointing to an inode which points to the data sectors. With a hard link, the directory entries point to the SAME inode. Thus, a hard-linked file takes EXACTLY the same amount of time to resolve as the original file. (Exceptions being when they arre in different directories; a deeper-buried directory entry will, of course, take extra time to access.) for two files in the same directory linked together, such as compress and uncompress, they will take the same amount of time, while the alias lookup WOULD add time, needing not only the single directory->inode->data resolution, but the memory resident table lookup as well. That is why an alias gains you nothing over a hard-linked file in terms of speed. And the purposes served remain different. Deven -- Deven T. Corzine Internet: deven@rpi.edu, shadow@pawl.rpi.edu Snail: 2151 12th St. Apt. 4, Troy, NY 12180 Phone: (---) --none-- Bitnet: deven@rpitsmts, userfxb6@rpitsmts UUCP: uunet!rpi!deven Simple things should be simple and complex things should be possible.