Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!husc6!cmcl2!phri!roy From: roy@phri.UUCP (Roy Smith) Newsgroups: comp.unix.wizards Subject: How to clear directory stack in csh Message-ID: <3269@phri.UUCP> Date: 15 May 88 20:51:36 GMT Organization: Public Health Research Institute, NYC, NY Lines: 23 Is there any way to clear the directory stack in csh without doing popd? I did essentially the following recently: # cd / # mount /dev/ndl7 /mnt # pushd /mnt/etc # pushd # umount /mnt # popd <-- this gave an "invalid directory" or somesuch message. The problem was that my directory stack was "/ /mnt/etc". I was allowed to umount /mnt because while /mnt/etc was in my dirstack because it wasn't actually the current directory of any proces, 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. -- Roy Smith, System Administrator Public Health Research Institute 455 First Avenue, New York, NY 10016 {allegra,philabs,cmcl2,rutgers}!phri!roy -or- phri!roy@uunet.uu.net