Yanking and Putting

Command

Action

h

Copy into hold space; wipe out what’s there.

H

Copy into hold space; append to what’s there.

g

Get the hold space back; wipe out the destination line.

G

Get the hold space back; append to the pattern space.

x

Exchange contents of the hold and pattern spaces.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.