Hack #6-> Automatically Correct Mistyped Directory Names

Use shopt -s cdspell to correct the typos in the cd command
automatically as shown below. If you are not good at typing and make
lot of mistakes, this will be very helpful.

# cd /etc/mall
-bash: cd: /etc/mall: No such file or directory
# shopt -s cdspell
# cd /etc/mall
# pwd
[Note: By mistake, when I typed mall instead of mail, cd
corrected it automatically]

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s