News for hackers. Stuff that matters.
Re:Some powerful commands for Linux by RyanMcGreal on Saturday November 27, 2010 @02:28PM (#1945650)
It's really handy if you need to jump back and forth between two directories with diverse paths.
Re:Some powerful commands for Linux by chronomex on Saturday November 27, 2010 @04:38PM (#1945952)
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]$
Re:Some powerful commands for Linux by billswift on Saturday November 27, 2010 @06:36PM (#1946184)
On 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.
Re:Some powerful commands for Linux by xhuang on Sunday November 28, 2010 @04:50AM (#1947080)
the command go with pushd is popd,which pop the last path you pushed into the queue.