Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Log cleanup tool-clearlog

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

In general, system logs are difficult to clear by hand. Here is a tool called clearlog

How to use it:

Usage: clearlogs [\\ computername]

-app = application log

-sec = security log

-sys = Syslog

a. You can clear the log of the remote computer

* * first connect with ipc: net use\\ ip\ ipc$ password / user: user name

* * then start to clear: method

Clearlogs\\ ip-app this is to clear the application log of the remote computer

Clearlogs\\ ip-sec this is to clear the security log of the remote computer

Clearlogs\\ ip-sys this is to clear the system log of the remote computer

b. Clear the local log: if the connection to the remote computer cannot be empty. Then you need to transfer this tool to the remote computer.

Then clean it up. Methods:

Clearlogs-app this clears the application log of the remote computer

Clearlogs-sec this is to clear the security log of the remote computer

Clearlogs-sys this is to clear the system log of the remote computer

Clear the hint of success: Success: The log has been cleared successful.

To avoid having to clear it manually every time. You can create a batch file. Let it be cleared automatically. Do a good job of batch documents. Then use the at command to create a scheduled task. Let it run automatically.

For example, create a c.bat:

Rem = = start

@ echo off

Clearlogs-app

Clearlogs-sec

Clearlogs-sys

Del clearlogs.exe

Del c.bat

Exit

Rem = = end

When testing on this machine, you can display it without @ echo off. You can see the results.

The first line says that the window is not displayed at run time

The second line says: clear the application log

The third line says: clear the security log

The fourth line says: clear the system log

The fifth line says: delete clearlogs.exe as a tool

The sixth line says: delete the batch file c.bat

The seventh line says: exit

Use the AT command. Create a scheduled task to run regularly, in at command format (open cmd, enter as follows):

AT time c:\ c.bat Note: time is 24-hour

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report