On Sun, Jun 13, 2010 at 06:46:56AM -0500, Peng Yu wrote:
> Hello,
> 
> I frequently need do cd multiple levels up. For example,
> 
> cd ../..
> cd ../../../../
> 
> It would be convenient to type something like "cd 2" or "cd 4". Is
> there a command for this?

You could write a function:

cdup() {
  local i
  for ((i=1; i<=$1; i++)); do
    cd ..
  done
}

Reply via email to