How to clear directory stack in csh

Roy Smith roy at phri.UUCP
Mon May 16 06:51:36 AEST 1988


	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 at uunet.uu.net



More information about the Comp.unix.wizards mailing list