SupportSages

Do you know Bash & csh shell likes carrots ?

Author Profile
George K.
  • 1 min read
Do you know Bash & csh shell likes carrots ?

Generating audio, please wait...

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]

Looking for AWS Experts?

We provide top-of-the-line custom AWS setup services tailored to your needs.

Author Profile
Posts by George K.

George started his career in web hosting and Linux technical support in the year 2004 and is with SupportSages since 2009. He has keen interest in server optimizations, custom security solutions, hacked server recovery, cyber forensic and high availability fail over system design and implementation. George loves long drives and is passionate about art and literature.


    Copyright © 2008 - 2025 SupportSages Pvt Ltd. All Rights Reserved.