Home » Infrastructure » Linux » rm command script
rm command script [message #464567] Thu, 08 July 2010 07:27 Go to next message
lokeshsurana
Messages: 212
Registered: April 2010
Location: India
Senior Member
Hi,

I am trying to write script for----

AS any one can delete any file at same the entry get added in log file

in that script i want only date of deletion file name and path

which script command need to use..????????

is that i need to modify standard rm command script..?


Thank You.


[Updated on: Thu, 08 July 2010 07:29]

Report message to a moderator

Re: rm command script [message #464573 is a reply to message #464567] Thu, 08 July 2010 07:34 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Please, note that this is an Oracle forum. Your question regards use of an operating system (Linux) - perhaps you should discuss the problem on one of Linux forums instead.
Re: rm command script [message #464576 is a reply to message #464567] Thu, 08 July 2010 07:42 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
And please rephrase the question.
I have no idea what you are talking about.
Re: rm command script [message #464578 is a reply to message #464576] Thu, 08 July 2010 07:47 Go to previous messageGo to next message
lokeshsurana
Messages: 212
Registered: April 2010
Location: India
Senior Member
i have my oracle application server on Linux and i want to write script as....

as any user or end user delete the record or any of file i want maintain the log file which contain the file deletion date and the path of the file which is going to delete...

Is for oracle application only....
Re: rm command script [message #464582 is a reply to message #464578] Thu, 08 July 2010 07:57 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
But, you shouldn't allow users to delete Oracle (data / control / redo log / whatever) files!

For "records" deleted from tables, enable auditing.
Re: rm command script [message #464630 is a reply to message #464578] Thu, 08 July 2010 09:50 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
As Littlefoot said, you are not supposed allow any end-user to do such OS level operations.
Depending on your Linux Distribution, you can enable AUDIT packages (audictl etc) in OS to log operations. It beyond the scope of this forum.
Speak to your sysadmin.
Re: rm command script [message #464636 is a reply to message #464578] Thu, 08 July 2010 10:09 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
You can get some information easily and depending on how long it is stored in history. Other option is to have a wrapper around "rm" command, but talk to your sysadmin first.
root@kalyani:/var/log# cat ~magvivek/.bash_history | grep rm  
rm *.lst
rm *.log
rm *.buf
rm test

Previous Topic: grub loading stage2 error
Next Topic: Recalling Previous commands
Goto Forum:
  


Current Time: Fri Mar 29 04:44:54 CDT 2024