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.
The information you told is very limited. Could you please describe your
problem more thorough so it would be better to understand what you want
to accomplish?
Which log do you mean? In which situation does it become deleted?
Kari
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
That's a great idea Bob - I'm going to give it a try
Thanks
Philippe
any log really but say /var/adm/messages
If somebody accidentally or intentionally deletes it. I'm trying to do
this as part of my hardening. The idead is If the log file cannot get
deleted then I'll always know what happened