linux vi – delete all lines

To delete all lines of file using vi  we use following command

:1,$d

This command will be apply d command to lines from 1 to end of file.
Hope this will help you get quicker on work

Leave a Reply