3 ms·
I use 'u' to navigate up parent directories: alias u="cd .." alias uu="cd ../.." alias uuu="cd ../../.." alias uuuu="cd ../../../.."
by tcbawo 8y ago
I use 'u' to navigate up parent directories:
alias u="cd .."
alias uu="cd ../.."
alias uuu="cd ../../.."
alias uuuu="cd ../../../.."
- bussierem 8y agoI found a much better way of handling this via SO one time, and I've kept it ever since: # Up command, from stackoverflow. Takes optional number of levels to cd ../ up(){ local d="" limit=$1 for ((i=1 ; i <= limit ; i++)) do d=$d/.. done d=$(echo $d | sed 's/^\///') if [ -z "$d" ]; then d=.. fi cd $d }
- vhanda 8y agoInteresting. I have the same, but aliases to `.` instead. alias ..='cd ../' alias ...='cd ../../' alias ....='cd ../../../' alias .....='cd ../../../../'