3 ms·
For that I usually use pushd. [chronomex@gir ~]$ mkdir test1 test2 [chronomex@gir ~]$ cd test2 [chronomex@gir ~/test2]$ pwd /home/chronomex/test2 [ch
by chronomex 16y ago
For that I usually use pushd.
[chronomex@gir ~]$ mkdir test1 test2
[chronomex@gir ~]$ cd test2
[chronomex@gir ~/test2]$ pwd
/home/chronomex/test2
[chronomex@gir ~/test2]$ pushd ../test1
~/test1 ~/test2
[chronomex@gir ~/test1]$ pwd
/home/chronomex/test1
[chronomex@gir ~/test1]$ pushd
~/test2 ~/test1
[chronomex@gir ~/test2]$ pwd
/home/chronomex/test2
[chronomex@gir ~/test2]$
- billswift 16y agoOn older systems you had to do a fairly complicated set up for pushd/popd yourself. I did once in along 1998 or so, but never bothered again, since the great majority of the time "cd -" was good enough.
- xhuang 16y agothe command go with pushd is popd,which pop the last path you pushed into the queue.