Command introduced before JUNOS Release 7.4.
Remove contents of a log file.
filename — Name of the specific log file to truncate.
all — (Optional) Truncate the specified log file and delete all archived versions of it.
clear
See file list for an explanation of output fields.
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
detaillcc0-re0: -------------------------------------------------------------------------- -rw-r----- 1 root wheel 26450 Jun 23 18:47 /var/log/sampled total 1
user@host> clear log lcc0-re0:sampledlcc0-re0: --------------------------------------------------------------------------
user@host> file list lcc0-re0:/var/log/sampled
detaillcc0-re0: -------------------------------------------------------------------------- -rw-r----- 1 root wheel 57 Sep 15 03:44 /var/log/sampled total 1