Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux clear lines of log

$ wc -l myscript.log
475494 myscript.log

$ echo "$(tail -1000 myscript.log)" > myscript.log

$ wc -l myscript.log
1000 myscript.log
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #linux #clear #lines #log
ADD COMMENT
Topic
Name
8+5 =