Reply All

A response to the Internet.

pushd and popd

onethingwell:

A pair of very useful commands, pushd saves the current directory and (optionally) changes to a different one; popd returns you to the saved directory:

$ pwd
/home/you/directory
$ pushd /somewhere/far/away/in/the/filesystem
$ pwd
/somewhere/far/away/in/the/filesystem
$ cd /somewhere/else
$ cd /yet/another/place
$ popd
$ pwd
/home/you/directory

I use these constantly but it seems lots of folk aren’t aware of them. Very useful if you have a couple of directories in a build tree you need to jump between and keep having to type in.

  1. mikethecoder reblogged this from onethingwell
  2. stevenla reblogged this from onethingwell
  3. metanom reblogged this from onethingwell and added:
    I use these constantly but it seems lots...folk aren’t aware of them. Very
  4. onethingwell posted this