vodkadrinker
Technical User
I would like to log a command use of rm, user date and file etc, I thought this would be straight forward using the following script.
cat rm
echo `who am i` $1 >> /tmp/rmlog
/usr/bin/rmafile $1
rmafile now being the original rm.
However you can put options and more than one file after the rm command so $1 is not enough. I have put in $1 $2 $3 $4 $5 to get round the problem, is there a better way to do this?
cat rm
echo `who am i` $1 >> /tmp/rmlog
/usr/bin/rmafile $1
rmafile now being the original rm.
However you can put options and more than one file after the rm command so $1 is not enough. I have put in $1 $2 $3 $4 $5 to get round the problem, is there a better way to do this?