do
if [-f $filename1 ];then
rm -f $filename1
fi
done
windows bat
,思想类似实现基本雷同:
1.
2. echo set heading off feedback off pagesize 0 verify off
echo off > sql.txt
3. echo conn / as sysdba >> sql.txt
4. echo spool tmp.txt >> sql.txt
5. echo select value pvalue from v$diag_info where name='Diag
Trace'; >> sql.txt
6. echo select value pvalue from v$diag_info where name='Diag
Alert'; >> sql.txt
7. echo spool off >> sql.txt
8. echo exit>> sql1.txt sql.txt
9.
10. sqlplus -S /nolog @sql.txt
11.
12. (Set /p Line1=&Set /p Line2=)<tmp.txt
13. cd /d %Line1%
14. for %%i in ("*.log") do (
15. echo %%i:
文件大小
=%%~zi
字节
16. if %%~zi gtr 1000000000 move %%i ..
17. )
18.
19. cd /d %Line2%
20. for %%i in ("*.xml") do (
21. echo %%i:
文件大小
=%%~zi
字节
22. if %%~zi gtr 1000000000 del %%i
23. )
文档被以下合辑收录
评论