How to delete lines (not) containing specific string
How to delete lines (not) containing specific string Remove lines not containing 2016-10-30 sed -i.bak '/2016-10-30/ !d' ./log.txt Remove lines containing 2016-10-30 sed -i.bak '/2016-10-30/ d' ./log.txt option -i.bak will create backup file.