ls命令列出某一天以及文件名模糊查…


cd $ORACLE_BASE/diag/rdbms///trace/ ====> replace ,


ls |egrep "lmon|lms|lmd" |xargs grep "2015-01-22 16:" |awk -F":" '{print $1}' |sort -u


-bash-3.2$ ls |egrep "lmon|lms|lmd" |xargs grep "2015-01-22 16:" |awk -F":" '{print $1}' |sort -u
PROD1_lmd0_9180.trc
PROD1_lmon_9178.trc


-bash-3.2$ ls |egrep "lmon|lms|lmd" |xargs grep "2015-01-22 16:" |awk -F":" '{print $1}' |sort -u
PROD2_lmd0_48144.trc
PROD2_lmon_48142.trc
-bash-3.2$

你可能感兴趣的:(操作系统)