Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All
     

    Related Documentation

     

    clear log

    Syntax

    clear log filename<all>

    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.

    Description

    Remove contents of a log file.

    Options

    filename

    Name of the specific log file to delete.

    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
    lcc0-re0:
    --------------------------------------------------------------------------
    -rw-r-----  1 root  wheel      26450 Jun 23 18:47 /var/log/sampled
    total 1
    
    user@host> clear log lcc0-re0:sampled
    lcc0-re0:
    --------------------------------------------------------------------------
    
    user@host> file list lcc0-re0:/var/log/sampled detail
    lcc0-re0:
    --------------------------------------------------------------------------
    -rw-r-----  1 root  wheel         57 Sep 15 03:44 /var/log/sampled
    total 1
    

    Published: 2013-01-30