Operating System - HP-UX
1825810 Members
3063 Online
109688 Solutions
New Discussion

Re: How do I stop command history being recorded in POSIX shell

 
Shaun Holliday_2
New Member

How do I stop command history being recorded in POSIX shell

I've set up a new user 'test' with startup shell of /usr/bin/sh - POSIX shell.
I removed the /home/test/.profile file completely so that all settings will be
derived from /etc/profile (see attacment)when logging in.
I removed the .sh_history file from the home directory.
When logging in, via telnet, as 'temp', env shows that HISTFILE HISTSIZE and
EDITOR are not set and yet the .sh_history is recreated if it doesn't exist and
appended to if it does. Why?

How can I prevent the recreation of .sh_history?

Shaun


Configuration Info

Operating System - HP-UX
Version - 10.20
Hardware System - HP9000
Series - 800
2 REPLIES 2
Vitek Pepas_1
Occasional Advisor

Re: How do I stop command history being recorded in POSIX shell

Acording to shell documentation if you do not set HISTFILE and HISTSIZE
variables , the shell defaults to a file named .sh_history of 128 lines.
To supress creating history file try to set HISTFILE to an empty string or
HISTSIZE to 0.
Zhang Zhao gui
Frequent Advisor

Re: How do I stop command history being recorded in POSIX shell

I think you can just remove the line "export HISTFILE=/.sh_history". But I
don't know what's
the default value and maximum for HISTSIZE? Where to find this value and where
it is defined?