I enjoy using pushd, but I typically forget to use it before changing
directories.  Of course there's always 'cd -' which will take you to
the last directory you were in.  Just now I had a thought - will this
work with pushd?  The answer is yes.

Scenario:  You're in /home/foo and you cd to /usr/local/bin.  Now you
remember you're going to bounce back & forth between these
directories.  You could 'pushd /home/foo' then 'pushd' to establish
two directories on top of the directory stack and get back to where
you just were.  Here's the cool trick.  Just do 'pushd -' and you've
now got your current directory plus the one you were just in in the
directory stack.  The 'pushd' command by itself will move you between
the top two directories listed in the stack.

To display the contents of the directory stack, use 'dirs'

Curt

-- 
You received this message because you are subscribed to the Google Groups 
"NLUG" group.
To post to this group, send email to nlug-talk@googlegroups.com
To unsubscribe from this group, send email to 
nlug-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nlug-talk?hl=en

Reply via email to