.bashrc up
To cd up a certain number of times, add this to your .bashrc file
up() { local d="" local limit="$1" if [ -z "$limit" ] || [ "$limit" -le 0 ]; then limit=1 fi for ((i=1;i<=limit;i++)); do d="../$d" done if ! cd "$d"; then echo "Path shallower than $limit"; fi }