Typically when you type history from command line, it displays the command# and the command. For auditing purpose, it may be beneficial to display the timestamp along with the command as shown below.
[oracle@micro ~]$ export HISTTIMEFORMAT='%F %T'
[oracle@micro ~]$ history |grep rm
26 2013-06-11 06:06:34cd rmn
28 2013-06-11 06:06:34cd rman/
34 2013-06-11 06:06:34cat rman target / log=/shared/backup_arch/Restor_rman.log << EOF
35 2013-06-11 06:06:34cat rman.log
36 2013-06-11 06:06:34cat rman.trc
45 2013-06-11 06:06:34cat rmna.sh
49 2013-06-11 06:06:34cd rman/
52 2013-06-11 06:06:34rm -fr *
57 2013-06-11 06:06:34 rman target /
65 2013-06-11 06:06:34 rman target /
67 2013-06-11 06:06:34 rman target /
81 2013-06-11 06:06:34 rman target /
91 2013-06-11 06:06:34rman target/
114 2013-06-11 06:06:34rm -v fro_ac_0521.gz fro_ac_20130525.dmp fro_ac_0523.gz
117 2013-06-11 06:06:34cd /backup/rman/
133 2013-06-11 06:06:34cd rman_bakup_piece/
137 2013-06-11 06:06:34cat rman.log
138 2013-06-11 06:06:34cat rmna.sh
139 2013-06-11 06:06:34cat rmna.sh
141 2013-06-11 06:06:34rm -fr *
175 2013-06-11 06:06:34rmna
176 2013-06-11 06:06:34rman
178 2013-06-11 06:06:34rman
201 2013-06-11 06:06:34scp 172.16.0.218:/shared/backup_arch/rman_bakup_piece/* .
213 2013-06-11 06:06:34rm -fr *
221 2013-06-11 06:06:34rm /crd01/oradata/OTOWNPRD/control01.ctl
222 2013-06-11 06:06:34rm /crd02/oradata/OTOWNPRD/control02.ctl
223 2013-06-11 06:06:34rm /crd03/oradata/OTOWNPRD/control03.ctl
235 2013-06-11 06:06:34scp 172.16.0.218:/shared/backup_arch/rman_bakup_piece/OTOWNPRD_arch* .
257 2013-06-11 06:06:34rman
260 2013-06-11 06:06:34rman
277 2013-06-11 06:06:34rman target/
332 2013-06-11 06:06:34rm -fr test_*
337 2013-06-11 06:06:34rm -fr *.dmp
398 2013-06-11 06:06:34rm -rf adump/ cdump/ udump/
408 2013-06-11 06:06:34rm -rf *
474 2013-06-11 06:06:34rm *
479 2013-06-11 06:06:34rm -v alert_reportdb.log
489 2013-06-11 06:06:34rm *
557 2013-06-11 06:06:34rm -fr OTOWNPRD_1_2*
631 2013-06-11 06:06:34cd dirprm
633 2013-06-11 06:06:34vi rep1.prm
634 2013-06-11 06:06:34cat rep1.prm
636 2013-06-11 06:06:34cat load2.prm
637 2013-06-11 06:06:34cat jagent.prm
675 2013-06-11 06:06:34cd dirprm
705 2013-06-11 06:06:34rm -fr *
731 2013-06-11 06:06:34cd /shared/oradata/dirprm
733 2013-06-11 06:06:34cat jagent.prm
743 2013-06-11 06:06:34cd dirprm
748 2013-06-11 06:06:34mkdir -p /shared/oradata/dirprm/ex
822 2013-06-11 06:06:34cd dirprm
827 2013-06-11 06:06:34cd ../load2.prm
828 2013-06-11 06:06:34cat ../load2.prm
829 2013-06-11 06:06:34cat ../rep1.prm
830 2013-06-11 06:06:34cat ../mgr.prm
924 2013-06-11 06:06:34ls /shared/oradata/dirprm
958 2013-06-11 06:06:34cd dirprm/
961 2013-06-11 06:06:34cat dpump.prm
1011 2013-06-11 06:08:29history |grep rm
1017 2013-06-11 06:09:48history |grep rm
[oracle@micro ~]$
[oracle@micro ~]$ export HISTTIMEFORMAT='%F %T'
[oracle@micro ~]$ history |grep rm
26 2013-06-11 06:06:34cd rmn
28 2013-06-11 06:06:34cd rman/
34 2013-06-11 06:06:34cat rman target / log=/shared/backup_arch/Restor_rman.log << EOF
35 2013-06-11 06:06:34cat rman.log
36 2013-06-11 06:06:34cat rman.trc
45 2013-06-11 06:06:34cat rmna.sh
49 2013-06-11 06:06:34cd rman/
52 2013-06-11 06:06:34rm -fr *
57 2013-06-11 06:06:34 rman target /
65 2013-06-11 06:06:34 rman target /
67 2013-06-11 06:06:34 rman target /
81 2013-06-11 06:06:34 rman target /
91 2013-06-11 06:06:34rman target/
114 2013-06-11 06:06:34rm -v fro_ac_0521.gz fro_ac_20130525.dmp fro_ac_0523.gz
117 2013-06-11 06:06:34cd /backup/rman/
133 2013-06-11 06:06:34cd rman_bakup_piece/
137 2013-06-11 06:06:34cat rman.log
138 2013-06-11 06:06:34cat rmna.sh
139 2013-06-11 06:06:34cat rmna.sh
141 2013-06-11 06:06:34rm -fr *
175 2013-06-11 06:06:34rmna
176 2013-06-11 06:06:34rman
178 2013-06-11 06:06:34rman
201 2013-06-11 06:06:34scp 172.16.0.218:/shared/backup_arch/rman_bakup_piece/* .
213 2013-06-11 06:06:34rm -fr *
221 2013-06-11 06:06:34rm /crd01/oradata/OTOWNPRD/control01.ctl
222 2013-06-11 06:06:34rm /crd02/oradata/OTOWNPRD/control02.ctl
223 2013-06-11 06:06:34rm /crd03/oradata/OTOWNPRD/control03.ctl
235 2013-06-11 06:06:34scp 172.16.0.218:/shared/backup_arch/rman_bakup_piece/OTOWNPRD_arch* .
257 2013-06-11 06:06:34rman
260 2013-06-11 06:06:34rman
277 2013-06-11 06:06:34rman target/
332 2013-06-11 06:06:34rm -fr test_*
337 2013-06-11 06:06:34rm -fr *.dmp
398 2013-06-11 06:06:34rm -rf adump/ cdump/ udump/
408 2013-06-11 06:06:34rm -rf *
474 2013-06-11 06:06:34rm *
479 2013-06-11 06:06:34rm -v alert_reportdb.log
489 2013-06-11 06:06:34rm *
557 2013-06-11 06:06:34rm -fr OTOWNPRD_1_2*
631 2013-06-11 06:06:34cd dirprm
633 2013-06-11 06:06:34vi rep1.prm
634 2013-06-11 06:06:34cat rep1.prm
636 2013-06-11 06:06:34cat load2.prm
637 2013-06-11 06:06:34cat jagent.prm
675 2013-06-11 06:06:34cd dirprm
705 2013-06-11 06:06:34rm -fr *
731 2013-06-11 06:06:34cd /shared/oradata/dirprm
733 2013-06-11 06:06:34cat jagent.prm
743 2013-06-11 06:06:34cd dirprm
748 2013-06-11 06:06:34mkdir -p /shared/oradata/dirprm/ex
822 2013-06-11 06:06:34cd dirprm
827 2013-06-11 06:06:34cd ../load2.prm
828 2013-06-11 06:06:34cat ../load2.prm
829 2013-06-11 06:06:34cat ../rep1.prm
830 2013-06-11 06:06:34cat ../mgr.prm
924 2013-06-11 06:06:34ls /shared/oradata/dirprm
958 2013-06-11 06:06:34cd dirprm/
961 2013-06-11 06:06:34cat dpump.prm
1011 2013-06-11 06:08:29history |grep rm
1017 2013-06-11 06:09:48history |grep rm
[oracle@micro ~]$
No comments:
Post a Comment