« Slashdot (useful) stupid unix tricks #4 Command output diffSlashdot (useful) stupid unix tricks #2 - Reset your shell »

Slashdot (useful) stupid unix tricks #3 - pushd popd

11/23/08

Permalink 12:04:35 am, by admin Email , 71 words   English (US) latin1
Categories: Technology, Unix, Mac, BSD, Linux

Slashdot (useful) stupid unix tricks #3 - pushd popd

Link: http://ask.slashdot.org/comments.pl?sid=1019609&cid=25649889

One of my favorites I learned from this thread was pushd/popd. This is a method for changing directories but also logging where you just came from so you can easily jump back. In the following example I will jump from my home directory to / to /Users and then use popd to reverse in order through the same directories.

$ pwd /Users/Bryan $ pushd / / ~ 
$ pwd / $ pushd Users /Users / ~ 
$ pwd /Users $ popd / ~ 
$ popd ~ 
$ pwd /Users/Bryan 
$ 

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
September 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
This is for Unix articles.

Search

XML Feeds

Click some ads

google search

powered by free blog software