Centosvi copy and delete the cut paste command
Copy:
Yy: copy the current row
Nyy: Number of copied rows (including the current row ). Assume that three rows are copied, And the cursor is positioned at the position of Row 3. If you enter 3yy, 1 ~ is copied ~ 3 rows of content
Copy multiple rows in another way: (start row, end row co paste position), for example, copy 3 ~ Paste the content of five lines to the end of nine lines. In command mode, enter: 3, 5 co 9
Delete:
Dd: Delete the current row.
Ndd: delete multiple rows, same as copy
Delete multiple rows: (start row, end row de), for example, delete 3 ~ In command mode, enter 3, 5 de.
Cut:
The cutting principle is the same as the deletion principle. It uses d, dd, and ndd. In fact, the deleted content in linux is stored in the buffer zone. Press p to paste it.
Another method: (Starting row, ending Row m sticking position), for example, cutting 3 ~ Paste the content of five lines to the end of nine lines. In command mode, enter: 3, 5 m 9
Paste:
P