vim in linux, delete all contents in the current file

Step 1: Open the file you want to delete

vi 需要删除的文件

In the second step, after entering the file, use shift+g to enter the last line

Step 3: Press esc and then use:1,.d to delete all content

第二种方式:进入文件后直接输入100dd,可以删除100行的数据,应该

Guess you like

Origin blog.csdn.net/yyuggjggg/article/details/122307741