How do I remove the last line of a file in Linux?

How do I remove the last line of a file in Linux?
Answer
That + sign there means that when the file is opened in the vim text editor, the cursor will be positioned on the last line of the file. Now just press d twice on your keyboard. This will do exactly what you want—remove the last line. After that, press : followed by x and then press Enter .
 

Tìm kiếm

Back
Top