Linux Up Command Multiple Level of Directory

up ()
{
    local old="$PWD"
    for i in $(seq "${1:-1}"); do
        cd ..
    done
    OLDPWD="$old"
}
Important Iguana