A quick change to a different directory and leave with "pushd" and "popd" practice:
Code:
> Pwd
/ Home / thomas / tmp
> Pushd / var / spool / cron
/ Var / spool / cron ~ / tmp
> Dirs
/ Var / spool / cron ~ / tmp
> Pushd / bin
/ Bin / var / spool / cron ~ / tmp
> Popd; popd
~ / Tmp
> Popd
bash: popd: directory stack empty
If you want a longer chain of command to type often, can simplify this with the alias feature of the shell. An alias is valid only interactively, that is, in a script function is to be used. The following command shows the currently defined aliases:
> Alias This defines an alias Come Ande "myf"
Myf alias = "find.-Type f-size +1 M-ls 2> / dev / null"
Bookmarks