Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Basic script appends to flash:LOG - Manage size of file

I have a basic script that when triggered it issues "show log | append flash:LOG". What can I do so the file doesn't grow so large that it fills the flash:? I know I could FTP the file, but is there some way to limit the file size itself?

Everyone's tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Basic script appends to flash:LOG - Manage size of file

Not sure what your script is exactly, but you can check the size of the file using the Tcl proc:

file size flash:LOG

If the file is bigger than your threshold, either zero it out or copy it (archive it off) then zero out the contents.  Then run your command to do the append operation.

1 REPLY
Cisco Employee

Basic script appends to flash:LOG - Manage size of file

Not sure what your script is exactly, but you can check the size of the file using the Tcl proc:

file size flash:LOG

If the file is bigger than your threshold, either zero it out or copy it (archive it off) then zero out the contents.  Then run your command to do the append operation.

522
Views
0
Helpful
1
Replies
CreatePlease to create content