cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2052
Views
0
Helpful
1
Replies

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

Bill CARTER
Level 5
Level 5

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?

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

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.

View solution in original post

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

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.