Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux remove last n lines from file

#remove last 80 lines from cars.csv
head -n -80 cars.csv > tmp.csv && mv tmp.csv cars.csv
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #linux #remove #lines #file
ADD COMMENT
Topic
Name
4+1 =