ThịThúy Hiền
New member
How do I remove all lines from a file in Linux?
Answer
Delete all lines in VI / VIM editor – Unix / Linux
Answer
Delete all lines in VI / VIM editor – Unix / Linux
- Go to command mode in the editor by pressing ESC key on the keyboard.
- Press gg. It will take to the first line of the file.
- Then press dG. This will delete from the first line to the last line.