DISCLAIMER : Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility.If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.


Runs previous command replacing the typo

when we run a command with a typo, we can correct the typo and re-run the command by the following command.

^wrong^right

Here are the examples:

The man command is wrongly typed as many
[root@test /]# many head
-bash: many: command not found


The y is replaced with empty character.
[root@test /]# ^y
man head

--------------------------------------------------------------
Here man is typed as men

[root@test /]# men head
-bash: men: command not found
the letter e is replaced with a and then the command executes.
[root@test /]# ^e^a
man head