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

How to Increase the timeout in phpMyAdmin

Search for a string in multiple files