In the below example i have show how to navigate up to level 5 using cd……(cd followed by 6 dots).
Here a single dot represents the current directory, 2 dot means 1 level up, 3 dots means 2 level up and so on..

Add the following alias.

$ alias cd..="cd .."
$ alias cd...="cd ../.."
$ alias cd....="cd ../../.."
$ alias cd.....="cd ../../../.."
$ alias cd......="cd ../../../../.."

Now use cd…. to navigate upto level 3.

Add more alias if you need.


thanks to linuxhacks.


1 Response » to “Try to navigate up the directory using cd followed by consecutive dots”

  1. Anonymous says:

    Or you can use a shell that implements this syntax natively.

Leave a Reply