When we try to execute a command at the shell, we make mistakes like missing out a character or misspell it. Do you know you can correct them without having to type the command again or taking the history and changing them ? See the following example to understand the use of bash shell caret!
# find . -naem “*.php” -exec chmod 644 {} \;
find: invalid predicate `-naem’
This is when carrots comes to help. Issue this command in the shell and you will get the results.
# ^em^me^
find . -name “*.php” -exec chmod 644 {} \;
If you just execute the command without a proper history to replace, it will display,
bash: :s^em^me^: substitution failed
[related_posts]