$ upup(){ DEEP=$1; [ -z "${DEEP}" ] && { DEEP=1; }; for i in $(seq 1 ${DEEP}); do cd ../; done; }

— by andreaganduglia on June 9, 2015, 3:09 p.m.

Include this function in your .bashrc and on the following line alias up='upup'

.bashrc

alias up='upup'

Now you are able to go back in your path simply with up N. So, for example:

up N

Z:~$ cd /var/lib/apache2/fastcgi/dynamic/ Z:/var/lib/apache2/fastcgi/dynamic$ up 2 Z:/var/lib/apache2$ up 3 Z:/$

Tweet

$ up(){ DEEP=$1; for i in $(seq 1 ${DEEP:-"1"}); do cd ../; done; }

— by alireza6677 on June 28, 2017, 5:40 p.m.

Include this function in your .bashrc