[clug] Command of the Hour

Alex Osborne ato at meshy.org
Mon Nov 17 02:29:44 GMT 2008


Andrew Janke wrote:
> # go to wherever you were before
> alias b="cd ${OLDPWD}"

In bash and probably other shells, "cd -" is a built-in shorthand for 
"cd $OLDPWD".

Also check out "pushd", "popd" and "dirs" which let you manage a stack 
of directories (so for example you could alias pushd as cd and then use 
popd as a multi-level back button).





More information about the linux mailing list