Path: utzoo!attcan!uunet!munnari!vuwcomp!mark From: mark@comp.vuw.ac.nz (Mark Davies) Newsgroups: comp.unix.wizards Subject: Re: How to clear directory stack in csh Message-ID: <13612@comp.vuw.ac.nz> Date: 17 May 88 01:14:15 GMT References: <3269@phri.UUCP> Reply-To: mark@comp.vuw.ac.nz (Mark Davies) Organization: Comp Sci, Victoria Univ, Wellington, New Zealand Lines: 17 In article <3269@phri.UUCP> roy@phri.UUCP (Roy Smith) writes: > ..., but I couldn't clear >the dirstack because a popd would try to cd back to /mnt/etc which no >longer existed. Having a bogus directory at the bottom of my dirstack >doesn't actually do any harm, but it was annoying that I couldn't find any >way to get rid of it without exiting the shell. popd +1 will remove the first entry in the directory stack (given current directory is the 0th entry) so if you have a stack that was "/ /mnt/etc" popd +1 will leave it as "/" and since this does not involve changing directory it doesn't matter that /mnt/etc no longer exists. (This works on all machines I have access to, Pyramid, Sun, 4.3BSD Vaxen). mark -- Domainised: mark@comp.vuw.ac.nz Bang form: ...!uunet!vuwcomp!mark