Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Solaris10 Command history in $HISTFILE

807557Apr 9 2007 — edited Apr 10 2007
Solaris 10 Experts

Recently we upgraded our Solaris8 boxes to Solaris 10 ( all except our nfs box which is still Sol8). I have noticed that on the Sol10 boxes the command history is being written to $HOME/.sh_history instead of $HOME/$HISTFILE in a particular scenario.

==== This is what I have in .profile ( home dir is nfs mounted )====
export HISTFILE="$HOME/.history.`logname`"
export HISTSIZE=2000

We use op command to login as the applicatin id. Here are the sequence of events that will give a better understanding of the problem
e.g my id is "jsmith", application id is "catprod", app is a distributed application on "app1", "app2" , one nfs box "appnfs" and one dbbox "appdb".

1. Login to box app1( Solaris 10)
2. op in as the application id
3. HISTFILE is .history.myid
( no issues so far , commands are written to the above file as expected )
4. ssh to box app2 (Solaris 10)
5 HISTFILE is .history.catprod
( But the commands are always beting written to $HOME/.sh_history file)
6. ssh to box appnfs ( Solaris 8)
7. HISTFILE is .history.catprod
( no issues , commands are always written to the above file as expected )

We have the same application running in a UAT environment on Solaris 8 boxes. No issues here always writes to whatever $HISTFILE points to.

My Questions:
Why is not always writing to whatever $HISTFILE points to?
Is this because of the home directory mounted from a nfs box which is on Solaris8.?

Any pointers will be greatly appreciated. Thanks for your valuable time in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 8 2007
Added on Apr 9 2007
2 comments
1,234 views