Backup / delete event log files

转载 2012年03月30日 12:29:08

http://www.windows-commandline.com/2011/12/backup-delete-event-log-files.html


We can delete or backup event log files from command line using wmiccommands. The wmic sub command for managing event log files is nteventlog.

Below are the methods available with ‘wmic nteventlog‘ command.

BackupEventlog
ClearEventlog

Backup event log files

We can run the below command to backup a event log file.

wmic nteventlog where filename='logfilename' backupeventlog Backupfilepath

Example:

Let’s backup application event log to the file c:\application.evt. Command for this is as below.

wmic nteventlog where filename='application' backupeventlog c:\application.evt

Command to backup security event log file:

wmic nteventlog where filename='security' backupeventlog c:\security.evt

Command to backup system event log file:

wmic nteventlog where filename='system' backupeventlog c:\system.evt

Delete event log files:

Command to delete event log files is:

wmic nteventlog where filename='logfilename' cleareventlog

Examples:
Command to delete application event log file:

wmic nteventlog where filename='application' cleareventlog

Command to clear system event log file:

wmic nteventlog where filename='system' cleareventlog

Command to clear security events log file:

wmic nteventlog where filename='security' cleareventlog


Delete Duplicate Files

  • 2012年09月06日 16:54
  • 239KB
  • 下载

vb backup files/folder source code

  • 2009年02月21日 13:48
  • 56KB
  • 下载

不要在linux上使用java 7 Files的接口参数StandardOpenOption.DELETE_ON_CLOSE

最近在看安全代码规范建议中提到关于如何删除创建的临时文件,推荐使用jdk7中的Files的函数,通过参数StandardOpenOption.DELETE_ON_CLOSE来控制 代码示例 Buffe...

Delete files or directories in bash shell

As a new user to study Linux, this blog will introduces the command that be used to remove files or ...
  • myxyhg
  • myxyhg
  • 2016年06月11日 12:15
  • 136

delete log

  • 2011年05月11日 12:57
  • 64KB
  • 下载

Event_Log_Explorer_4.3.8.zi

  • 2017年01月16日 17:43
  • 4.67MB
  • 下载

delete expired backup 和 delete obsolete

delete expired删除的是那些本来RMAN以为存在但是实际上在磁盘或者磁带上已经被删除了的信息,删除的只是RMAN资料库中的记录;delete obsolete则删除旧于备份保留策略定义...

Table_map_log_event内容详解.pdf

  • 2017年11月01日 22:58
  • 554KB
  • 下载

LAH 笔记 Syslog and Log Files

1. syslog的进程名保存在/etc/run/syslogd.pid /etc/run 下面有很多后缀为.pid的文件,保存的都是相关进程的pid 如果需要更新log文件而结束syslog...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Backup / delete event log files
举报原因:
原因补充:

(最多只允许输入30个字)