dirs

From Initq
Jump to: navigation, search

dirs, pushd and popd are directory stack commands. dirs shows you the stack. pushd pushes a directory to the stack and popd unloads the last directory that was put on the stack.

[a507394@localhost ~]$ dirs
~ /etc/sysconfig/network-scripts /etc/init.d /var/spool/postfix/pid /var/spool/postfix /var/spool/mail /tmp /etc ~
[a507394@localhost ~]$ popd
/etc/sysconfig/network-scripts /etc/init.d /var/spool/postfix/pid /var/spool/postfix /var/spool/mail /tmp /etc ~
[a507394@localhost network-scripts]$ pwd
/etc/sysconfig/network-scripts
[a507394@localhost network-scripts]$ pushd .
/etc/sysconfig/network-scripts /etc/sysconfig/network-scripts /etc/init.d /var/spool/postfix/pid /var/spool/postfix /var/spool/mail /tmp /etc ~
[a507394@localhost network-scripts]$
Personal tools