Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

linux clear lines of log

tail -n 1000 myscript.log | sponge myscript.log
Comment

PREVIOUS NEXT
Code Example
Shell :: how do i close my virtual window which is created by screen command in linux 
Shell :: check container logging driver 
Shell :: windows build support installation failed unity linux 
Shell :: push to a new remote branch 
Shell :: install new kernel ubuntu 20.04 
Shell :: certbot command 
Shell :: how to add branches 
Shell :: Git bisect automated 
Shell :: journalctl max log size 
Shell :: tgz terminal 
Shell :: manjaro mute speaker 
Shell :: how to change ssh key for git 
Shell :: clang format linux 
Shell :: create a new repository from command line 
Shell :: kill traffic to port linux 
Shell :: rename heroku remote 
Shell :: tor mac not connected 
Shell :: install tailwind using yarn 
Shell :: windows 10 ipconfig fix 
Shell :: linux history delete multiple lines 
Shell :: install chco windows 
Shell :: android studio create virtual device compatible with google play 
Shell :: bash set environment variable 
Shell :: Shell Script to Install Ansible AWX on centos 7 
Shell :: install Miniconda r 
Shell :: push my logs to elk using filebeat 
Shell :: batch file with flags 
Shell :: git revert last 2 commits 
Shell :: add ssh public key to server 
Shell :: setting Flask app variable 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =