Skip to main content

Usefull Find Commands


find . -name '*.trc' -mtime +1 -exec rm -f {} \;

find . -name 'aukornbr_evmlog.20*' -mtime +10 -exec rm -f   {} \;

find . -name '*.trm' -mtime +1 -exec rm -f {} \;

find . -name '*.aud' -mtime +1 -exec rm -f {} \; &

ls -l |grep "Oct 27"|awk '{print "rm "$9}'|sh ls -l |grep "Oct 27"|awk '{print "rm "$9}'|sh
===============================================================================
for i in G M K; do du -kh | grep [0-9]$i | sort -nr -k 1; done | head -n 11
===============================================================================
find . -name "+ASM3_*" -mtime +01 -exec rm -f {} \;

find . -name "avosorbr_evmlog*" -mtime +30 -exec rm -f {} \;

find . -name "avoadt3r_evmlog*" -mtime +25 -exec ls -ltr {} \;

find . -name "recover_OLAPPRO*" -mtime +90 -exec rm -rf {} \;

find . -name "avoadp4r_evmlog.2014*" -mtime +30 -exec rm -f {} \;

find . -name "emagent.trc*" -mtime +10 -exec rm -f {} \;

find . -name "+ASM3_ora_*" -mtime +1 -exec rm -f {} \;

ls -lrt|grep "*err"|xargs rm -ef {}\;

find . -name "vf_sox_listener_*" -mtime +05 -exec gzip {} \;

find . -name '*.xml' -mtime +1 -exec rm -rf {} \;

find . -name "RANOPDA_ora_*" -mtime +02 -exec gzip {} \;

find . -name "DEPOVPI5*" -mtime +01 -exec gzip {} \;

ls -ltr |grep "Jan"|grep ".trc"|awk '{print "ls -ltr "$9}'| sh
ps -ef |grep LOCAL=NO|grep WLLVTST|awk '{print "kill -9 " $2}'|sh
ls -ltr |grep "Oct 1"|grep ".aud"|awk '{print "rm "$9}'| sh

ls -ltr |grep "Feb "|grep ".aud"|awk '{print "rm "$9}'| sh

ls -ltr |grep "Mar"|grep ".aud"|awk '{print "rm "$9}'| sh

ls -ltr |grep "Feb"|grep ".aud"|awk '{print "rm "$9}'| sh

ls -ltr |grep "Apr"|grep ".aud"|awk '{print "rm "$9}'| sh

ls -ltr |grep "Apr "|grep ".aud"|awk '{print "rm "$9}'| sh

ls -ltr |grep "Aug"|awk '{print "gzip " $9}'| sh

ls -ltr |grep "Jul"|awk '{print "rm -f "$9}'| sh

ls -ltr |grep "2012"|grep "evmlog"|awk '{print "rm -f "$9}'| sh

cat input|cut -d : -f2|awk '{ print $5}'|egrep "0D|1D|RD"
cat input|cut -d : -f2|awk '{ print $5}'|egrep -w "0D|1D|RD"
cat input|cut -d : -f2|awk '{ print $5}'
cat input|cut -d : -f2|awk '{ print $5}'|cut -d -r4
cat input|cut -d : -f2|awk '{ print $5}'|cut -d - -f4
cat input|cut -d : -f2|awk '{ print $5}'|cut -d - -f5
cat input|cut -d : -f2|awk '{ print $5}'|cut -d - -f5|egrep ^"1D|0D|RD"
   
find /opt/oracle -size +50000000c -print
cd /opt/oracle/$ORACLE_SID/admin/bdump;tail -50 alert*.log
for i in G M K; do du -sh | grep [0-9]$i | sort -nr -k 1; done | head -n 11

find . -name '*.aud' -mtime +2 -exec rm -f {} \;

find . -name '*.trm' -mtime +1 -exec rm -f {} \

for a in `olsnodes` ; do ;echo $a ; ssh -q $a free -m ;done

Comments

Popular posts from this blog

Hard dependency with ip address Oracle RAC Cluster.

Command error out due to hard dependency with ip address [-Node1]/app/grid/oracle/product/11.2.0/grid/bin>./crsctl relocate resource RDBMS_DB -n Node2 CRS-2527: Unable to start 'RDBMS_DB' because it has a 'hard' dependency on 'sDB' CRS-2525: All instances of the resource 'sDB' are already running; relocate is not allowed because the force option was not specified CRS-4000: Command Relocate failed, or completed with errors. [-Node1]/app/grid/oracle/product/11.2.0/grid/bin>./crsctl relocate resource sDB  -n Node2 CRS-2529: Unable to act on 'DB' because that would require stopping or relocating 'LISTENER_DB', but the force option was not specified CRS-4000: Command Relocate failed, or completed with errors. [-Node1]/app/grid/oracle/product/11.2.0/grid/bin>./crsctl relocate resource LISTENER_DB  -n Node2 CRS-2527: Unable to start 'LISTENER_DB' because it has a 'hard' dependency on 'sD...

19C NID ( Rename Database)

 [oracle@localhost ~]$ nid DBNEWID: Release 19.0.0.0.0 - Production on Thu Dec 23 00:05:36 2021 Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved. Keyword     Description                    (Default) ---------------------------------------------------- TARGET      Username/Password              (NONE) DBNAME      New database name              (NONE) LOGFILE     Output Log                     (NONE) REVERT      Revert failed change           NO SETNAME     Set a new database name only   NO APPEND      Append to output log           NO HELP        Displays these messages    ...

ORA-01017/ORA-28000 with AUDIT_TRAIL

With default profile in Oracle 11g, accounts are automatically locked 1 day ( PASSWORD_LOCK_TIME ) after 10 failed login attempt ( FAILED_LOGIN_ATTEMPTS ): SQL > SET lines 200 SQL > SET pages 200 SQL > SELECT * FROM dba_profiles WHERE PROFILE = 'DEFAULT' ORDER BY resource_name; PROFILE                         RESOURCE_NAME                      RESOURCE LIMIT ------------------------------ -------------------------------- -------- ---------------------------------------- DEFAULT                         COMPOSITE_LIMIT                 ...