Delete multiple lines in Linux style Vi Editor

We often have situations were we need to modify a file using vi on Unix style file system and delete multiple lines. Here are some details and examples on how to do it.

Syntax:
xdd

dd is the command to delete a complete row. x in the number of lines to be deleted.

Examples:
delete 2 lines
2dd
delete 10 lines
10dd

Comments

Popular posts from this blog

Mysql on XAMPP performance issues and tuning

Change Firefox Browser Default View Source Editor to your Favorite Text Editor