web analytics


Do you know Bash & csh shell likes carrots ?

Tags: LinuxSnippets

Published on: April 18, 2009 by George K.

Do you know Bash & csh shell likes carrots ?


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


Category : General, Linux, Snippets

George K.

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.

You may also read:


Add new commentSIGN IN

Let's Connect

Get new updates


$0.000 items