[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: about the “OLDOLDPWD”
From: |
Greg Wooledge |
Subject: |
Re: about the “OLDOLDPWD” |
Date: |
Thu, 16 Jun 2022 11:36:39 -0400 |
On Thu, Jun 16, 2022 at 01:29:01PM +0800, lumianshuo@DELL via wrote:
> Hello , when I use the cd and dirs. Sometimes I need the last‘OLDPWD is cur
> PWD or not .
> Alright I can record the var at the begin. But if can I judge this by a tool
> that shell given? i.e. have the shell save the “last” OLDPWD ? If have ,
> where have it saved?
Have a look at pushd and popd. Otherwise, there's always saving $PWD
into another variable, as you already said.