Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!email!swdsrv.edvz.univie.ac.at!heinz From: heinz@cc.univie.ac.at Newsgroups: comp.unix.questions Subject: Re: Symbolic link Message-ID: Date: 24 May 91 10:49:37 GMT Article-I.D.: cc.heinz.675082177 References: <9105200532.AA27396@csufres.CSUFresno.EDU> <16213@smoke.brl.mil> Sender: news@swdsrv.edvz.univie.ac.at Organization: Vienna University Computer Center Lines: 44 Nntp-Posting-Host: sophie.pri.univie.ac.at In <16213@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes: >In article <9105200532.AA27396@csufres.CSUFresno.EDU> quang@CSUFRES.CSUFRESNO.EDU (Quang Ngo) writes: >>If someone were to make a symbolic link to my account (if I accidentally >>left it opened), then how do I know? How would I remove it? [Stuff deleted] >thorough job of that you'd need superuser privileges. You can remove any >entry from any directory for which you have write permission, using the >"rm" utility. The question, as I understand it, was how to remove the symbolic link, motivated by the following: One of the major problems with hard links is that if you create a hard link to another user's file and the owner removes the 'file' (he really removes his directory entry for the file, which is in fact another hard link itself - the directory entry, not the file), the file still exists and the user now may be accounted for a file he doesn't know of any longer (if the deletion of the file on disk is accompanied by a deletion of the file in the user's memory :-). This is why the use of hard links should be highly discouraged, although they can be detected via the link count. With symbolic links, this problem does not exist, since a symbolic link only contains the path name of the file (to be exact: it contains the path name of a hard link to the file), and if this hard link (= directory entry) is deleted, the symbolic link becomes a dangling pointer and cannot be used any longer. So there's no need to find and remove any symbolic links to your directory. Simply remove the files you want to remove, and the link to them won't be of use any longer. I hope this answers your question. Greetings, HH -- -------------------------------------------------------------------------------- ---/ Heinz M. Herbeck / Trust me, I know / /- --/ heinz@sophie.pri.univie.ac.at / what I'm doing ! / /-- -/ Vienna University, Austria / (Sledge Hammer) / /--- --------------------------------------------------------------------------------