Delete log files in the S12700 in batches.

Created: Dec 22, 2018 09:22:52Latest reply: Dec 29, 2018 10:29:44 147 6 8 1

The device system runs for a long time, and the device generates a large amount of LOG logs, which takes up space. If you want to upgrade the device, you will encounter insufficient prompt space.

At this time, you need to delete the LOG log to free up space, but there are hundreds of log files. How to implement batch deletion of log files?


1. Change the file operation mode first without prompting:

[S12700]file prompt quiet


The file prompt command is used to modify the reminder mode of file operations. Quiet indicates no prompt.

By default, it is the alert reminder mode. If the reminder mode of the file operation is set to not prompt, the data loss will not be prompted due to the user's misoperation (such as deleting files and overwriting the file), please use it with caution.


2, <s12700>delete /unreserved 2018-03-28.log.zip //Delete the log of 2018-03-28

<s12700>delete /unreserved *.log.zip //Use the wildcard "*" to delete, for example to delete all log.zip logs

As shown in the figure below, the screenshots before bulk deletion and after batch deletion are as follows


  • x
  • convention:

yiyi0519  Visitor   Created Dec 22, 2018 09:28:56 Helpful(0) Helpful(0)

can you introduce the way that how to download the log files?
  • x
  • convention:

xiaomumu  Visitor   Created Dec 24, 2018 09:37:08 Helpful(0) Helpful(0)

Learn more, great
  • x
  • convention:

3li     Created Dec 25, 2018 01:10:28 Helpful(0) Helpful(0)

Good
  • x
  • convention:

No.9527  Visitor   Created Dec 26, 2018 11:31:06 Helpful(0) Helpful(0)

og files of a switch are saved in the syslogfile or logfile folder in the flash memory.

<HUAWEI>dir //Display all the files and folders in the flash memory.
Directory of flash:/

Idx Attr Size(Byte) Date Time FileName
0 -rw- 1,766 Dec 24 2040 03:37:54 private-data.txt
3 drw- - Dec 24 2040 03:40:12 syslogfile
4 drw- - Dec 24 2040 03:37:58 compatible
16 -rw- 10,571 Jan 04 2041 03:51:18 elabel-slot0.fls
……
<HUAWEI>cd logfile //Access the logfile folder.
<HUAWEI>dir
Directory of flash:/logfile/

Idx Attr Size(Byte) Date Time FileName
0 -rw- 10,824 Jan 24 2042 09:15:04 logfile-2042-01-24-09-15-03.zip
1 -rw- 15,334 Feb 03 2042 14:45:08 logfile-2042-02-03-14-45-08.zip
  • x
  • convention:

GongXiaochuan  Visitor   Created Dec 28, 2018 10:39:49 Helpful(0) Helpful(0)

when you check the logs too much, we can using way to delete the logs and clear the space on device
  • x
  • convention:

Good Good Study Day Day Up
Finn92  Visitor   Created Dec 29, 2018 10:29:44 Helpful(0) Helpful(0)

<s12700>delete /unreserved *.log.zip //Use the wildcard "*" to delete, for example to delete all log.zip logs

As shown in the figure below, the screenshots before bulk deletion and after batch deletion are as follows

it's very helpful , because commonly , we need delete more logs for geting more space on device .
  • x
  • convention:

Reply

Reply
You need to log in to reply to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Fast reply Scroll to top