loading...

re: Bash: How To Teleport In The Terminal VIEW POST

TOP OF THREAD FULL DISCUSSION
re: pushd and popd are super handy for jumping to several locations, then trying to backtrack to where you were a few jumps ago; I've known about them ...
 

~- is the value of the shell variable OLDPWD, so you can list out your previous directory with ls ~- . Saves a little time from having to type all the extra characters in cd - && ls && cd - .

But since it holds the actual directory path, it's even more useful because you can quickly list out any subdirs with ls ~-/oldPwdSubDir/anotherSubdir

Code of Conduct Report abuse