Centos vi copy and delete the cut paste command, centos Paste

Source: Internet
Author: User

Centos vi copy and delete the cut paste command, centos Paste

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


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.