I have used
pushd
to move about to various directories and now if I run
dirs -v
I get:
0 ~/Desktop
1 /etc
2 /var/log
3 ~/Downloads
4 /tmp
How can I popd
to a specific directory in the middle of the stack?, e.g option 2: /var/log
man bash
says
> +n Removes the nth entry counting from the left of the list shown
> by dirs, starting with zero. For example: \``popd +0'' removes the
> first directory, ``popd +1'' the second.
I've tried
* ``popd +0''
* popd +3
And it pops the correct directory off the stack, but doesn't change the current working directory.
How can I popd
the particular directory and change the current working directory to the "popped" dir?
Asked by the_velour_fog
(12770 rep)
Apr 12, 2015, 04:59 PM
Last activity: Jun 19, 2018, 01:19 PM
Last activity: Jun 19, 2018, 01:19 PM