why doesn't command history work for user root?
Arthur David Olson
ado at elsie.UUCP
Thu Jun 9 13:07:35 AEST 1988
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 at ncifcrf.gov ADO is a trademark of Ampex.
More information about the Comp.unix.questions
mailing list