Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

clear log

 

Syntax

Release Information

Command introduced before Junos OS Release 7.4.

Command introduced in Junos OS Release 9.0 for EX Series switches.

Command introduced in Junos OS Release 11.1 for the QFX Series.

Command introduced in Junos OS Release 14.1X53-D20 for OCX Series switches.

Description

Remove contents of a log file.

Options

filenameName of the specific log file to delete. Note that the file name cannot contain any special characters, including: ![=;|(){}]
all(Optional) Delete the specified log file and all archived versions of it.

Required Privilege Level

clear

Related Documentation

List of Sample Output

clear log

Output Fields

See file list for an explanation of output fields.

Sample Output

clear log

The following sample commands list log file information, clear the contents of a log file, and then display the updated log file information:

user@host> file list lcc0-re0:/var/log/sampled detail
user@host> clear log lcc0-re0:sampled
user@host> file list lcc0-re0:/var/log/sampled detail