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
  • 下载

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 ...

delete log

  • 2011-05-11 12:57
  • 64KB
  • 下载

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

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

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则删除旧于备份保留策略定义...

转储Linux日志文件(Rotating Linux Log Files - Part 2: Logrotate)

logrotate is the default application used to rotate all other log files not handled by syslog itself...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

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