-
--获取gi home下所有文件权限
-
root # ./permission.pl $gi_home
-
-
--过滤垃圾信息,便于后期比较
-
grep -ev "/oracle/app/19.3.0/grid/cfgtoollogs/opatchautodb/|\
-
/oracle/app/19.3.0/grid/cfgtoollogs/opatch/|\
-
/oracle/app/19.3.0/grid/network/tools/help/|\
-
/oracle/app/19.3.0/grid/rdbms/audit/|\
-
/oracle/app/19.3.0/grid/usm/install/|\
-
/oracle/app/19.3.0/grid/nls/data/|\
-
/oracle/app/19.3.0/grid/sqlpatch/3|\
-
/oracle/app/19.3.0/grid/sqlpatch/2|\
-
/oracle/app/19.3.0/grid/.patch_storage/|\
-
/oracle/app/19.3.0/grid/log/|\
-
/oracle/app/19.3.0/grid/inventory/backup/|\
-
/oracle/app/19.3.0/grid/rdbms/mesg/|\
-
/oracle/app/19.3.0/grid/rdbms/log/opatch/lsinv/|\
-
/oracle/app/19.3.0/grid/cfgtoollogs/opatchauto/|\
-
/oracle/app/19.3.0/grid/suptools/tfa/release/|\
-
/oracle/app/19.3.0/grid/tfa/|\
-
/oracle/app/19.3.0/grid/opatch.bak/" permission-三-1月-18-10-07-45-2023 > gi_ck1.log
-
-
--获取db home下所有文件权限
-
root # ./permission.pl $oracle_home
-
-
--过滤垃圾信息
-
grep -ev "/oracle/app/oracle/product/19.3.0/db_1/rdbms/xml/em/|\
-
/oracle/app/oracle/product/19.3.0/db_1/.patch_storage/|\
-
/oracle/app/oracle/product/19.3.0/db_1/inventory|/oracle/app/oracle/product/19.3.0/db_1/apex/|\
-
/oracle/app/oracle/product/19.3.0/db_1/suptools/orachk|/oracle/app/oracle/product/19.3.0/db_1/cfgtoollogs/|\
-
/oracle/app/oracle/product/19.3.0/db_1/opatch_bak/|\
-
/oracle/app/oracle/product/19.3.0/db_1/jdk/lib/visualvm/|\
-
/oracle/app/oracle/product/19.3.0/db_1/rdbms/audit/|\
-
/oracle/app/oracle/product/19.3.0/db_1/rdbms/log/|\
-
/oracle/app/oracle/product/19.3.0/db_1/r/library/|\
-
/oracle/app/oracle/product/19.3.0/db_1/sqlpatch/3|\
-
/oracle/app/oracle/product/19.3.0/db_1/sqlpatch/2|\
-
/oracle/app/oracle/product/19.3.0/db_1/opatch.bak/|\
-
/oracle/app/oracle/product/19.3.0/db_1/log/|\
-
/oracle/app/oracle/product/19.3.0/db_1/network/tools/" permission-三-1月-18-10-08-44-2023 > db_ck1.log
-
-
--获取inventory文件权限并过滤
-
root # ./permission.pl /oracle/app/orainventory
-
-
grep -ev "/oracle/app/orainventory/logs/|\
-
/oracle/app/orainventory/backup/" permission-三-1月-18-10-03-08-2023 > inv_ck1.log
-
-
--排序后再比对
-
sort -k 4 -t " " gi_ck1.log >sort_gi_ck1.log
-
sort -k 4 -t " " db_ck1.log>sort_db_ck1.log
-
sort -k 4 -t " " inv_ck1.log>sort_inv_ck1.log
--统计各目录下文件个数
cat sort_gi_ck1.log|cut -b 39-47|uniq -c|sort -nr|head
cat sort_db_ck1.log|cut -b 56-65|uniq -c|sort -nr|head
还是$oracle_home/perl/ 目录下文件多