在Unix中清空log文件,可用如下命令:cp /dev/null alert_SID.log
[Oracle@oracle11gR2 trace]$ ll
total 136
-rw-r—– 1 oracle oinstall 122890 Jan 3 04:32 alert_denver.log
-rw-r–r– 1 oracle oinstall 0 Jan 3 05:06 alter.log
[oracle@oracle11gR2 trace]$ cp /dev/null alert_denver.log
[oracle@oracle11gR2 trace]$ ll
total 8
-rw-r—– 1 oracle oinstall 0 Jan 3 05:10 alert_denver.log
-rw-r–r– 1 oracle oinstall 0 Jan 3 05:06 alter.log