Bash - (Current|Working) Directory

1 - About

This article is about the management of the current directory in Bash.

3 - Management

3.1 - Query

3.2 - Shell variable

shell variable concerning the current directory

3.2.1 - Current: $PWD

working directory

pwd stands for “print working directory”.


echo $PWD

3.2.2 - Old: $OLDPWD

Old working directory (“OLD-Print-Working-Directory”, previous directory you were in).

cd must have be used once.


echo $OLDPWD

3.3 - Change


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap