Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: Bob Harris <nospam.News.Bob@remove.Smith-Harris.us>
Subject: Re: Preventing log file deletion
Date: Wed, 07 Oct 2009 18:50:52 -0400	[thread overview]
Message-ID: <nospam.News.Bob-1788AB.18505107102009@news.eternal-september.org> (raw)
In-Reply-To: 2b8a7669-aa3d-4df5-aad3-9d3d2a26787d@31g2000vbf.googlegroups.com

In article 
<2b8a7669-aa3d-4df5-aad3-9d3d2a26787d@31g2000vbf.googlegroups.com>
,
 catrefil <plabrosse@gmail.com> 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


  parent reply	other threads:[~2009-10-07 22:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07 14:05 Preventing log file deletion catrefil
2009-10-07 18:06 ` Kari Uusimäki
2009-10-09 13:42   ` catrefil
2009-10-07 22:50 ` Bob Harris [this message]
2009-10-09 13:32   ` catrefil
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox