批次顯示指定目錄下的檔案數量的sh指令碼

zhangsharp20發表於2015-11-10
[oracle@kf210 ~]$ cat count.sh 
echo J1_G3_ZBQ
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_g3_zbq/04\ procedure/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_g3_zbq/01\ init/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_g3_zbq/01\ table/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_g3_zbq/02\ view/ |grep "^-"| wc -l
echo J1_LDM
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_ldm/04\ procedure/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_ldm/01\ init/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_ldm/01\ table/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_ldm/02\ view/ |grep "^-"| wc -l
echo J1_DW
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_dw/04\ procedure/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_dw/01\ init/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_dw/01\ table/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_dw/02\ view/ |grep "^-"| wc -l
echo J1_DI
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_di/04\ procedure/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_di/01\ init/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_di/01\ table/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_di/02\ view/ |grep "^-"| wc -l
echo J1_LDCX
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_ldcx/04\ procedure/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_ldcx/01\ init/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_ldcx/01\ table/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_ldcx/02\ view/ |grep "^-"| wc -l
echo J1_CXTJ
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_cxtj/04\ procedure/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_cxtj/01\ init/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_cxtj/01\ table/ |grep "^-"| wc -l
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/j1_cxtj/02\ view/ |grep "^-"| wc -l
echo HX_ZGXT
ls -l /u01/app/oracle/admin/QJBJ1DW/dpdump/hx_zgxt/02\ view/ |grep "^-"| wc -l
[oracle@kf210 ~]$ 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29802484/viewspace-1826720/,如需轉載,請註明出處,否則將追究法律責任。

相關文章