greate trick . thanks -- Arjun Jain On Wed, Jan 27, 2010 at 11:53 PM, Bill Woody <[email protected]> wrote:
> Excellent trick. I will be using it later today. Thanks! > > Woody > > On 1/27/10, Curt Lundgren <[email protected]> wrote: > > 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 [email protected] > > To unsubscribe from this group, send email to > > [email protected]<nlug-talk%[email protected]> > > For more options, visit this group at > > http://groups.google.com/group/nlug-talk?hl=en > > > > -- > You received this message because you are subscribed to the Google Groups > "NLUG" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<nlug-talk%[email protected]> > For more options, visit this group at > http://groups.google.com/group/nlug-talk?hl=en > -- You received this message because you are subscribed to the Google Groups "NLUG" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nlug-talk?hl=en
