From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: e63b27eb52,26a7379b02844403 X-Google-Attributes: gide63b27eb52,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.mixmin.net!feeder.eternal-september.org!eternal-september.org!not-for-mail From: Bob Harris Newsgroups: comp.unix.tru64 Subject: Re: Preventing log file deletion Date: Wed, 07 Oct 2009 18:50:52 -0400 Organization: A noiseless patient Spider Message-ID: References: <2b8a7669-aa3d-4df5-aad3-9d3d2a26787d@31g2000vbf.googlegroups.com> X-Trace: news.eternal-september.org U2FsdGVkX1+rYfrRVEA9H3zhkJHZ6vG1rUkJu3vLOw7YGc6FgWOjEhdZRk26uRI1DuT1yZ7IfPW6bDv0gI6ycyMLGfUpofwXpYhClLFHApMuvFSpLhLbWlhi8Touag6OffJgmBVq4/ThLMPLRUSF3g== X-Complaints-To: abuse@eternal-september.org NNTP-Posting-Date: Wed, 7 Oct 2009 22:50:55 +0000 (UTC) User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Auth-Sender: U2FsdGVkX18IgPfZ67t12p0Wrr4dORDBcuTBhkvKvwAW/N2GX5k1yg== Cancel-Lock: sha1:ub2oRIDFTBVEsuHMOHrsx4c7d5w= Xref: g2news2.google.com comp.unix.tru64:106 In article <2b8a7669-aa3d-4df5-aad3-9d3d2a26787d@31g2000vbf.googlegroups.com> , catrefil wrote: > Hi, > > I'm trying to prevent log file from being deleted. > Would anybody already have implemented something like that? or have > any idea on how to do it? > > Thanks > > P. Create a hardlink to the file. As long as there is a directory pointing at the file, it will not be deleted, on the other directory entry. ln file.log /some/other/directory/file.log Notice there is NO -s in that 'ln' command. You want a hardlink, not a symlink. Of course if the file is not really deleted, but rather truncated instead, that would be a different storey. Bob Harris