<s>
In	O
computing	O
,	O
pushd	B-Device
and	I-Device
popd	I-Device
are	O
commands	B-Application
used	O
to	O
work	O
with	O
the	O
command	B-Application
line	I-Application
directory	B-Device
stack	I-Device
.	O
</s>
<s>
They	O
are	O
available	O
on	O
command-line	B-Application
interpreters	O
such	O
as	O
4DOS	B-Application
,	O
Bash	B-Operating_System
,	O
C	B-Operating_System
shell	I-Operating_System
,	O
tcsh	B-Language
,	O
Hamilton	B-Device
C	I-Device
shell	I-Device
,	O
KornShell	B-Language
,	O
cmd.exe	B-Device
,	O
and	O
PowerShell	B-Application
for	O
operating	O
systems	O
such	O
as	O
Windows	B-Application
and	O
Unix-like	B-Operating_System
systems	I-Operating_System
.	O
</s>
<s>
The	O
pushd	B-Device
command	B-Application
,	O
when	O
called	O
with	O
a	O
filepath	B-Application
as	O
an	O
argument	O
,	O
saves	O
the	O
current	B-Application
working	I-Application
directory	I-Application
in	O
memory	O
(	O
via	O
a	O
directory	B-Device
stack	I-Device
)	O
so	O
it	O
can	O
be	O
returned	O
to	O
at	O
any	O
time	O
,	O
places	O
the	O
new	O
filepath	B-Application
at	O
the	O
top	O
of	O
the	O
stack	B-Application
,	O
and	O
changes	O
to	O
the	O
new	O
filepath	B-Application
.	O
</s>
<s>
The	O
popd	B-Device
command	B-Application
returns	O
to	O
the	O
path	B-Application
at	O
the	O
top	O
of	O
the	O
directory	B-Device
stack	I-Device
.	O
</s>
<s>
This	O
directory	B-Device
stack	I-Device
is	O
accessed	O
by	O
the	O
command	B-Application
dirs	O
in	O
Unix	B-Application
or	O
Get-Location	O
-stack	O
in	O
Windows	B-Application
PowerShell	I-Application
.	O
</s>
<s>
The	O
first	O
Unix	B-Application
shell	I-Application
to	O
implement	O
a	O
directory	B-Device
stack	I-Device
was	O
Bill	O
Joy	O
's	O
C	B-Operating_System
shell	I-Operating_System
.	O
</s>
<s>
The	O
syntax	O
for	O
pushing	B-Application
and	I-Application
popping	I-Application
directories	O
is	O
essentially	O
the	O
same	O
as	O
that	O
used	O
now	O
.	O
</s>
<s>
Both	O
commands	B-Application
are	O
available	O
in	O
FreeCOM	B-Application
,	O
the	O
command-line	B-Application
interface	I-Application
of	O
FreeDOS	B-Application
.	O
</s>
<s>
In	O
Windows	B-Application
PowerShell	I-Application
,	O
pushd	B-Device
is	O
a	O
predefined	O
command	B-Device
alias	I-Device
for	O
the	O
Push-Location	O
cmdlet	O
and	O
popd	B-Device
is	O
a	O
predefined	O
command	B-Device
alias	I-Device
for	O
the	O
Pop-Location	O
cmdlet	O
.	O
</s>
<s>
Both	O
serve	O
basically	O
the	O
same	O
purpose	O
as	O
the	O
pushd	B-Device
and	I-Device
popd	I-Device
commands	B-Application
.	O
</s>
<s>
pushd	B-Device
[	O
path	B-Application
|	O
..	O
]	O
</s>
<s>
path	B-Application
This	O
optional	O
command-line	B-Application
argument	O
specifies	O
the	O
directory	O
to	O
make	O
the	O
current	B-Application
directory	I-Application
.	O
</s>
<s>
If	O
path	B-Application
is	O
omitted	O
,	O
the	O
path	B-Application
at	O
the	O
top	O
of	O
the	O
directory	B-Device
stack	I-Device
is	O
used	O
,	O
which	O
has	O
the	O
effect	O
of	O
toggling	O
between	O
two	O
directories	O
.	O
</s>
