Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Individual .sh_history using CDSL 1

Status
Not open for further replies.

Larshg

Programmer
Mar 1, 2001
187
DK
Hi

I'm working on a T64 V5.1 cluster

The same user is usede on all the servers, but we are many peoble using the user, and that means that the .sh_history is useless.

Is there a way to make the ._sh_history dependent on the {memb} and perhaps even the session, giving each login its seperate .sh_history?

/Larshg
 
man ksh

HISTFILE
If this variable is set when the shell is invoked,
then the value is the pathname of the file that will
be used to store the command history. (See Command
re-entry below.)

set 'HISTFILE' per user session

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Have a look at the use of the environmental variable HISTFILE for your shell, to see if that can be used to hold different variations of $HOME/.sh_history for each person. eg: $HOME/.sh_history_$USER

I hope that helps.

Mike
 
In the time it takes to start typing, get interrupted by the phone, then finish, someone else has replied. Well done vlad.

Cheers.

Mike
 
what can I say.....'great minds think alike'

the modest one.

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
I've added
set 'HISTFILE' per user session
to .profile

but it does not seem to make a difference

This new system is only using 1 system disk - that means that the .sh_history file is the same on alle serveres.

I've also tryede doing this in the session
set HISTFILE $HOME/._sh_history_user1
But I still get others history.

/Larshg
 
Hi Larshg,

There is a different format for "setting" environmental variables depending on what shell you are in. Also you need to export the variable.

If you are still having problems, then re-post the relevant parts of .cshrc .profile etc and say what shell the user is using.

I hope that helps.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top