Javatpoint Logo
Javatpoint Logo

vi undo and repeat

In command mode, to undo the last command u is used and if you want to repeat the last command use dot (.).


This command allows us to undo or cancel our last command.


Linux-Undo and Repeat1

Look at the above snapshot, this is our script.

Linux-Undo and Repeat2

Look at the above snapshot, with the help of dG command we have deleted last lines.

Linux-Undo and Repeat3

Look at the above snapshot, after pressing u, last command dG disables and all the content came back.


The . command allows us to repeat last used command.


Linux-Undo and Repeat4

Look at the above snapshot, we have used D command to delete some part of line second.

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA