Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

After pushding too many times, I want to clear the whole stack of paths.

How would I popd all the items in the stack?

I'd like to popd without needing to know how many are in the stack?

The bash manual doesn't seem to cover this.

Why do I need to know this? I'm fastidious and to clean out the stack.

share|improve this question
    
BTW, the complete bash manual is over at gnu.org. If you use the all on one page version, it may be easier to find stuff there. –  jw013 Feb 9 '12 at 6:39
    
Ah wish google indexed that one. Thanks @jw013 –  chrisjlee Feb 9 '12 at 7:14
add comment

1 Answer

up vote 11 down vote accepted

dirs -c is what you are looking for.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.