Correcting Mistakes and Altering Previous Commands

Learn how to correct mistakes in the previous commands.

We'll cover the following

We occasionally come across situations where we make a mistake when typing a command. There’s a syntax to address that.

Let’s type the following (intentionally wrong) command:

mdkir secret_files

The ^ operator

Of course, there’s no mdkir command, but rather than retyping the command, we can fix it with the notation ^old^new. We type the following to fix the command:

^dk^kd

Get hands-on with 1200+ tech skills courses.