← Back to team overview

sslug-teknik team mailing list archive

Re: 'back' alias?

 

Kristian Vilmann wrote:
> 
>> 
> I hvertfald i bash:
> $ cd -
> 
> Ex:
> [kvi@ktulu ~]$ cd /usr/X11R6/include/X11/pixmaps
> [kvi@ktulu /usr/X11R6/include/X11/pixmaps]$ cd -
> /home/kwv
> [kvi@ktulu ~]$ cd -
> /usr/X11R6/include/X11/pixmaps
> [kvi@ktulu /usr/X11R6/include/X11/pixmaps]$
>
Prøv lige at se 'man bash', cd opererer med 2 environmentvariable OLDPWD
og PWD. Ved hjælp af disse variable kan man flip-floppe mellem 2
directories med 'cd -' og
'cd'.

Mvh
Jørgen Heesche


References