Answers for "linux clear lines of log"

0

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
Posted by: Guest on December-16-2020
0

linux clear lines of log

tail -n 1000 myscript.log | sponge myscript.log
Posted by: Guest on December-16-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language