[clug] logging "rm" usage

Rousak, Boris Boris.Rousak at actewagl.com.au
Wed Jul 9 12:57:39 EST 2003


Good afternoon all,
I am attempting to write a script/program that will write to a log file
every time someone uses the "rm" command on a redhat 7.3 kernel 2.4.20-18.7
In particular it will log, who used it, date/time of usage and what it was
they actually deleted. Having googled for a bit most sites suggest either
using a "script" command to log everything and then parse that log file or
using a an alias script which logs everything and then invokes the real rm
command, but these solutions aren't particularly elegant. Thinking back to
windows I seem to remember that there was a facility to trap events (calls
to the OS). Question is as follows:
Is there a similar trapping facility in linux or
Is there a much easier way of doing this and I just haven't found it (hints
in this direction would also be much appreciated).
Any comments or past experiences in similar situations are also most
welcome.
Thanks for your time
Regards,
Boris


************************************************************************
*PLEASE NOTE*  This email and any attachments may
be confidential. If received in error, please delete all 
copies and advise the sender. The reproduction or 
dissemination of this email or its attachments is 
prohibited without the consent of the sender.

WARNING RE VIRUSES:  Our computer systems sweep
outgoing email to guard against viruses, but no warranty 
is given that this email or its attachments are virus free. 
Before opening or using attachments, please check for 
viruses.  Our liability is limited to the re-supply of any 
affected attachments.

Any views expressed in this message are those of the 
individual sender, except where the sender expressly,
and with authority, states them to be the views of the 
organisation.
************************************************************************



More information about the linux mailing list