Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!gatech!ncsuvx!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!umd5!cvl!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: comp.unix.questions Subject: Re: why doesn't command history work for user root? Summary: The real scoop Keywords: ksh Message-ID: <8091@elsie.UUCP> Date: 9 Jun 88 03:07:35 GMT References: <321@cmtl01.UUCP> <10357@ulysses.homer.nj.att.com> Organization: NIH-LEC, Bethesda, MD Lines: 21 Okay gang. . .the REAL scoop on why ksh doesn't keep history for the root user: after your system has crashed and comes up single user, you don't want to be writing command history to the root partition and possibly compounding damage to the file system. Here at elsie, our /.profile file contains these line: ENV=/.kshrc export ENV and our /.kshrc file contains these lines: if [ -z "$HISTFILE" ] then echo "If you want to keep command history, type" echo " doh" echo "when it's safe to write to the root disk" alias doh='HISTFILE=/.history; export HISTFILE; exec /etc/ksh' fi -- Grocery swaps ends for Chinese native. (5) ado@ncifcrf.gov ADO is a trademark of Ampex.