From a POSIX shell `$OLDPWD` holds the name of the previous working directory:cd /tmpecho You are here: $PWDecho You were here: $OLDPWDcd $OLDPWD
#Unix #Linux #Shell #cd
@YesIKnowITYou can also just `cd -`
CleverLibre Social is an inclusive social instance for open discussion, learning, and community. All cultures welcome. Hate speech and harassment strictly forbidden.