Delete all Lines in File with VI / VIM Editor

Delete all Lines in File with VI / VIM Editor


Ho to delete all lines in a file with single command using VI or VIM editor.

First open the file with vi or vim editor and type :%d and hit enter for delete all lines,

Vim delete all lines


after then type :wq and hit enter for the save changes and exit from the file,




Tech info

Comments

Post a Comment