From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!s6g2000vbp.googlegroups.com!not-for-mail From: catrefil Newsgroups: comp.unix.tru64 Subject: Re: Preventing log file deletion Date: Fri, 9 Oct 2009 06:32:11 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <2b8a7669-aa3d-4df5-aad3-9d3d2a26787d@31g2000vbf.googlegroups.com> NNTP-Posting-Host: 199.22.57.2 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1255095132 441 127.0.0.1 (9 Oct 2009 13:32:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 9 Oct 2009 13:32:12 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s6g2000vbp.googlegroups.com; posting-host=199.22.57.2; posting-account=UCOt4QoAAAATAXVqiwindXDtuiZ56WbX User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.unix.tru64:107 On 7 oct, 18:50, Bob Harris wrote: > In article > <2b8a7669-aa3d-4df5-aad3-9d3d2a267...@31g2000vbf.googlegroups.com> > , > > =A0catrefil 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. =A0As long as there is a directory > pointing at the file, it will not be deleted, on the other > directory entry. > > =A0 =A0 ln file.log /some/other/directory/file.log > > Notice there is NO -s in that 'ln' command. =A0You 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. > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 B= ob Harris That's a great idea Bob - I'm going to give it a try Thanks Philippe