Skip to content

“shopt -s cdspell” : Automatically correct mistyped directory names on cd

Use shopt -s cdspell to correct the typos in the cd command automatically as
shown below.

$ cd /var/vmall
-bash: cd: /var/vmall: No such file or directory
$ shopt -s cdspell
$ cd /var/vmall
$ pwd

Here actually i mistyped 'vmail' as 'vmall'.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.