Search⌘ K

Correcting Mistakes and Altering Previous Commands

Discover how to correct errors and alter previous commands in the command-line interface by using substitution shortcuts like caret notation and Bash modifiers. This lesson helps you save time and avoid retyping commands, improving your command-line workflow.

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, ...