Operating System - HP-UX
1822197 Members
3678 Online
109640 Solutions
New Discussion юеВ

ksh 2 different sessions have different command line history

 
James Myers
Occasional Contributor

ksh 2 different sessions have different command line history

I use ksh vi command line editing for command history. I get mysterious behaviour sometimes where the 2 different sessions have different command line history. When I was checking it out today, the commands in the history for my one session did not seem to be in my histfile at all. Even my fc commands seem to be viewing mysterious data not in my HISTFILE.

is there some kind of session specific file caching going on ? how can I get multiple sessions to all recognize the same command history in my HISTFILE.

not that its a big deal, just very frustrating.
4 REPLIES 4
Mark Greene_1
Honored Contributor

Re: ksh 2 different sessions have different command line history

Are you su'd when you see this? There's a difference between using "su" and "su -" which is a common pitfall.


mark
the future will be a lot like now, only later
James Myers
Occasional Contributor

Re: ksh 2 different sessions have different command line history

no, I'm not su'ed

I start multiple x terminal sessions logged in as myself, although I use rexec to start
them all.

all my sessions do run my profile on startup

its hpux 11.00, xterm using exceed,
Mark Greene_1
Honored Contributor

Re: ksh 2 different sessions have different command line history

The default shell for rexec is csh. Is that what you are using? And if so, what are set $history and $savehist set to?

mark
the future will be a lot like now, only later
James Myers
Occasional Contributor

Re: ksh 2 different sessions have different command line history

its ksh

I sometimes wonder if the unusually large size throws it off
HISTFILE=/users/tlane/.History
HISTSIZE=50000

I notice now that if I can find the oddball session, by comparing its history to my histfile, I can just rlogin again, and it starts using the histfile.

so I guess thats an ok work around,